I released a Python 3 package to PyPI (using this excellent cookiecutter template) which depends on C extensions written with Cython, JIT compilation with Numba and other packages dependent on Numpy and such.
When I don't specify any requirements in requirements.txt and\or in install_requires inside setupy.py the package installs successfully, indicating that the cookiecutter template does its job properly. Moreover, CI tools like AppVeyor and Travis can successfully build my package and test it.
However, when I type in the list of requirements, regardless of its order, pip install commands fails (in a naive virtual environment) and the CI tools are unable to build it as well (the error logs are visible in the links above). If I pre-install Numba on that virtual environment and then try to pip install everything works. This has been replicated on both Windows (10) and CentOS.
I suspect that when this issue will be solved the CI tools will also be able to build my package successfully.
Windows log:
C:\Users\Hagai\Documents\GitHub\python-pysight>activate py36
(py36) C:\Users\Hagai\Documents\GitHub\python-pysight>pip install pysight
Collecting pysight
Downloading pysight-0.1.6-cp36-cp36m-win_amd64.whl (113kB)
100% |████████████████████████████████| 122kB 460kB/s
Collecting attrs>=1.6 (from pysight)
Using cached attrs-16.3.0-py2.py3-none-any.whl
Collecting tables (from pysight)
Using cached tables-3.3.0-cp36-cp36m-win_amd64.whl
Collecting pandas (from pysight)
Using cached pandas-0.19.2-cp36-cp36m-win_amd64.whl
Collecting numba (from pysight)
Using cached numba-0.31.0.tar.gz
Collecting matplotlib (from pysight)
Using cached matplotlib-2.0.0-cp36-cp36m-win_amd64.whl
Collecting tifffile (from pysight)
Collecting cython (from pysight)
Collecting numpy>=1.8.0 (from tables->pysight)
Using cached numpy-1.12.0-cp36-none-win_amd64.whl
Collecting numexpr>=2.5.2 (from tables->pysight)
Using cached numexpr-2.6.2-cp36-none-win_amd64.whl
Collecting six (from tables->pysight)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas->pysight)
Using cached pytz-2016.10-py2.py3-none-any.whl
Collecting python-dateutil>=2 (from pandas->pysight)
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting llvmlite (from numba->pysight)
Using cached llvmlite-0.16.0.tar.gz
Collecting cycler>=0.10 (from matplotlib->pysight)
Using cached cycler-0.10.0-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 (from matplotlib->pysight)
Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Building wheels for collected packages: numba, llvmlite
Running setup.py bdist_wheel for numba ... error
Complete output from command C:\Users\Hagai\Anaconda3\envs\py36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hagai\\AppData\\Local\\Temp\\pip-build-ry0rxpw8\\numba\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Hagai\AppData\Local\Temp\tmpd75ai9dzpip-wheel- --python-tag cp36:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\numba\setup.py", line 250, in <module>
metadata['ext_modules'] = get_ext_modules()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\numba\setup.py", line 82, in get_ext_modules
import numpy.distutils.misc_util as np_misc
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Failed building wheel for numba
Running setup.py clean for numba
Complete output from command C:\Users\Hagai\Anaconda3\envs\py36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hagai\\AppData\\Local\\Temp\\pip-build-ry0rxpw8\\numba\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\numba\setup.py", line 250, in <module>
metadata['ext_modules'] = get_ext_modules()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\numba\setup.py", line 82, in get_ext_modules
import numpy.distutils.misc_util as np_misc
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Failed cleaning build dir for numba
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command C:\Users\Hagai\Anaconda3\envs\py36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hagai\\AppData\\Local\\Temp\\pip-build-ry0rxpw8\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Hagai\AppData\Local\Temp\tmpcioz28cjpip-wheel- --python-tag cp36:
running bdist_wheel
running build
got version from file C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\llvmlite/_version.py {'version': '0.16.0', 'full': '964cf1d6d725b000c769379a5efe11932fcfc551'}
running build_ext
C:\Users\Hagai\Anaconda3\envs\py36\python.exe C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py
Trying generator 'Visual Studio 12 2013 Win64'
Traceback (most recent call last):
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 152, in <module>
main()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 140, in main
main_win32()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 74, in main_win32
generator = find_win32_generator()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 62, in find_win32_generator
try_cmake(cmake_dir, build_dir, generator)
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 27, in try_cmake
subprocess.check_call(['cmake', '-G', generator, cmake_dir])
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
error: command 'C:\\Users\\Hagai\\Anaconda3\\envs\\py36\\python.exe' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build numba llvmlite
Installing collected packages: attrs, numpy, numexpr, six, tables, pytz, python-dateutil, pandas, llvmlite, numba, cycler, pyparsing, matplotlib, tifffile, cython, pysight
Running setup.py install for llvmlite ... error
Complete output from command C:\Users\Hagai\Anaconda3\envs\py36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hagai\\AppData\\Local\\Temp\\pip-build-ry0rxpw8\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Hagai\AppData\Local\Temp\pip-9a1uhuys-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
got version from file C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\llvmlite/_version.py {'version': '0.16.0', 'full': '964cf1d6d725b000c769379a5efe11932fcfc551'}
running build_ext
C:\Users\Hagai\Anaconda3\envs\py36\python.exe C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py
Trying generator 'Visual Studio 12 2013 Win64'
Traceback (most recent call last):
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 152, in <module>
main()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 140, in main
main_win32()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 74, in main_win32
generator = find_win32_generator()
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 62, in find_win32_generator
try_cmake(cmake_dir, build_dir, generator)
File "C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\ffi\build.py", line 27, in try_cmake
subprocess.check_call(['cmake', '-G', generator, cmake_dir])
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Users\Hagai\Anaconda3\envs\py36\lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
error: command 'C:\\Users\\Hagai\\Anaconda3\\envs\\py36\\python.exe' failed with exit status 1
----------------------------------------
Command "C:\Users\Hagai\Anaconda3\envs\py36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hagai\\AppData\\Local\\Temp\\pip-build-ry0rxpw8\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Hagai\AppData\Local\Temp\pip-9a1uhuys-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Hagai\AppData\Local\Temp\pip-build-ry0rxpw8\llvmlite\
CentOS log:
File "/tmp/easy_install-x7jp8trx/numba-0.31.0/setup.py", line 250, in <module>
File "/tmp/easy_install-x7jp8trx/numba-0.31.0/setup.py", line 82, in get_ext_modules
'matplotlib',
ModuleNotFoundError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-qkv60_2c/pysight/setup.py", line 104, in <module>
for root, _, _ in os.walk('src')
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/dist.py", line 315, in __init__
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/dist.py", line 361, in fetch_build_eggs
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 851, in resolve
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1123, in best_match
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1135, in obtain
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/dist.py", line 428, in fetch_build_egg
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 664, in easy_install
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 694, in install_item
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 875, in install_eggs
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1114, in build_and_install
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1100, in run_setup
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 249, in run_setup
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 168, in save_modules
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 143, in resume
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/_vendor/six.py", line 685, in reraise
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 156, in save_modules
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 246, in run_setup
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 276, in run
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 245, in runner
File "/opt/anaconda/anaconda2/envs/py36/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 47, in _execfile
File "/tmp/easy_install-x7jp8trx/numba-0.31.0/setup.py", line 250, in <module>
File "/tmp/easy_install-x7jp8trx/numba-0.31.0/setup.py", line 82, in get_ext_modules
'matplotlib',
ModuleNotFoundError: No module named 'numpy'
Related
Trying to install berkeleydb package for python on Windows.
Python 3.9.10
Pip 21.3.1
d:\pip install berkeleydb
Collecting berkeleydb
Using cached berkeleydb-18.1.5.tar.gz (430 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe' 'C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\Admin\AppData\Local\Temp\tmpxcy8yhoh'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-jxt67cx4\berkeleydb_a9b2c56166664d789a2f35b3ac5cfc73
Complete output (20 lines):
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-03j2vyim\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-03j2vyim\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-03j2vyim\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-03j2vyim\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 77, in <module>
import setup3
File "C:\Users\Admin\AppData\Local\Temp\pip-install-jxt67cx4\berkeleydb_a9b2c56166664d789a2f35b3ac5cfc73\setup3.py", line 346, in <module>
with open(os.path.join(incdir, 'db.h'), 'r') as f :
FileNotFoundError: [Errno 2] No such file or directory: 'db/include\\db.h'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c2/3f/a96d5caff3bbf0980fb47518ddb015a1df291f5ef31ee8c50ead21cb513a/berkeleydb-18.1.5.tar.gz#sha256=d8c2efbca9472f8848b13cce4f4904a5ea1e1540ee576e626a1491817832a50a (from https://pypi.org/simple/berkeleydb/). Command errored out with exit status 1: 'C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe' 'C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\Admin\AppData\Local\Temp\tmpxcy8yhoh' Check the logs for full command output.
I have no clues anymore. Totally removed python from my system and reinstalled it. Also with pip install bsddb3 I get a similar problem. However, I could install pandas without problems.
You can try installing bsddb first as follows
pip install bsddb3-6.1.1-cp34-none-win_amd64.whl
if that does'nt work try this
$ sudo apt install libdb-dev
$ pip install bsddb3
I'm trying to install the rpy2 package and can't get past a "The system cannot find the file specified". I'm not sure what file it can't find or why it isn't able to install (it is downloading the tar.gz file but won't install into the env).
I'm running on windows with python 3.6.8
Collecting rpy2
Using cached rpy2-3.3.6.tar.gz (179 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"'; __file__='"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\paulj\AppData\Local\Temp\pip-pip-egg-info-47z8bowi'
cwd: C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\
Complete output (20 lines):
cffi mode: CFFI_MODE.ANY
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 115, in <module>
c_extension_status = get_r_c_extension_status()
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 99, in get_r_c_extension_status
*situation.get_r_flags(r_home, '--ldflags')
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 210, in get_r_flags
allow_empty=False)))
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 179, in _get_r_cmd_config
universal_newlines=True
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 356, in check_output
**kwargs).stdout
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Following this link, I've been trying to install the tflite-support module using pip. I get the following error:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"'; __file__='"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/pip-egg-info
cwd: /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py", line 178, in <module>
zip_safe=False,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 103, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 111, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 132, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/.eggs/pybind11-2.4.3-py3.7.egg'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Any leads? I know similar questions have been asked before, but no luck with those answers
Turning the comment into an answer:
This looks like a regression in setuptools. Downgrade to 41:
$ pip install --upgrade 'setuptools<42'
Now (ideally) preinstall pybind11 to avoid missing headers when building the tflite-support wheel:
$ pip install 'pybind11>=2.4'
Now installing tflite-support should succeed without any intermediate errors:
$ pip install tflite-support
I already have dlib 19.1.0 and open cv 3.4.5 and numpy,scipy packages with advanced version but by using
pip install face_recognition
im getting following errors..Please can anyone help me what i did wrongly..
Collecting face_recognition
Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Requirement already satisfied: numpy in c:\python35\lib\site-packages (from face_recognition) (1.15.4)
Collecting dlib>=19.7 (from face_recognition)
Using cached https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz
Collecting face-recognition-models>=0.3.0 (from face_recognition)
Requirement already satisfied: Click>=6.0 in c:\python35\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: Pillow in c:\python35\lib\site-packages (from face_recognition) (5.4.1)
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Admin\AppData\Local\Temp\pip-wheel-de03y7mf --python-tag cp35:
running bdist_wheel
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\wheel\bdist_wheel.py", line 188, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition-models, face-recognition
Found existing installation: dlib 19.1.0
Uninstalling dlib-19.1.0:
Successfully uninstalled dlib-19.1.0
Running setup.py install for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Admin\AppData\Local\Temp\pip-record-tjyw2jml\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python35\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1
----------------------------------------
Rolling back uninstall of dlib
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Admin\AppData\Local\Temp\pip-record-tjyw2jml\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\
Actually i tried with some other installation keywords and tried to rectified error but 'm getting same errors when i used pip install face_recognition and my python version is 3.5.2 and i tried with wheel files also with specified version of python and face_recognition.
Following wheel files are i have tried wheel files..
https://pypi.org/simple/face-recognition/
Hello for this problem make this
step 1:
pip install cmake dlib
step 2:
pip install face-recognition
If you have the problem by dlib check this
sudo apt install python3-dev
I am trying to run scrapy in a virtualenv environment with different python versions.
For python3, I did the following :
virtualenv -p python3 NAME
cd NAME
source /bin/activate
After activation,
pip3 install scrapy
It is installed successfully. But when I run scrapy, I get the following error :
ImportError: /usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: PyInt_FromLong
Which shows that it is using my system's python2.7.
My ultimate goal is to run different versions of scrapy with different versions of python.
EDIT : I think there is a problem with cryptography module.
When I tried
pip3 install --upgrade pyOpenSSL,
I got this :
Collecting pyOpenSSL
Using cached pyOpenSSL-17.0.0-py2.py3-none-any.whl
Collecting cryptography>=1.7 (from pyOpenSSL)
Using cached cryptography-1.8.1.tar.gz
Requirement already up-to-date: six>=1.5.2 in ./lib/python3.5/site-packages (from pyOpenSSL)
Requirement already up-to-date: idna>=2.1 in ./lib/python3.5/site-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: asn1crypto>=0.21.0 in ./lib/python3.5/site-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: packaging in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Collecting setuptools>=11.3 (from cryptography>=1.7->pyOpenSSL)
Using cached setuptools-35.0.2-py2.py3-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.7->pyOpenSSL)
Using cached cffi-1.10.0-cp35-cp35m-manylinux1_x86_64.whl
Requirement already up-to-date: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging->cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools>=11.3->cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->cryptography>=1.7->pyOpenSSL)
Building wheels for collected packages: cryptography
Running setup.py bdist_wheel for cryptography ... error
Complete output from command /home/parth/gsoc/sample/try/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nvvy22iz/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp66xa7d7xpip-wheel- --python-tag cp35:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nvvy22iz/cryptography/setup.py", line 335, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 387, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 187, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_openssl.py", line 94, in <module>
extra_link_args=extra_link_args(compiler_type()),
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding
extra_link_args=extra_link_args,
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi
ffi = FFI()
File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 56, in __init__
import _cffi_backend as backend
ImportError: /usr/local/lib/python2.7/dist-packages/_cffi_backend.so: undefined symbol: _Py_ZeroStruct
----------------------------------------
Failed building wheel for cryptography
Running setup.py clean for cryptography
Complete output from command /home/parth/gsoc/sample/try/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nvvy22iz/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nvvy22iz/cryptography/setup.py", line 335, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 387, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 187, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_openssl.py", line 94, in <module>
extra_link_args=extra_link_args(compiler_type()),
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding
extra_link_args=extra_link_args,
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi
ffi = FFI()
File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 56, in __init__
import _cffi_backend as backend
ImportError: /usr/local/lib/python2.7/dist-packages/_cffi_backend.so: undefined symbol: _Py_ZeroStruct
----------------------------------------
Failed cleaning build dir for cryptography
Failed to build cryptography
Installing collected packages: setuptools, cffi, cryptography, pyOpenSSL
Found existing installation: setuptools 34.3.2
Not uninstalling setuptools at /usr/local/lib/python2.7/dist-packages, outside environment /home/parth/gsoc/sample/try
Found existing installation: cffi 1.9.1
Not uninstalling cffi at /usr/local/lib/python2.7/dist-packages, outside environment /home/parth/gsoc/sample/try
Found existing installation: cryptography 1.5.3
Not uninstalling cryptography at /usr/local/lib/python2.7/dist-packages, outside environment /home/parth/gsoc/sample/try
Running setup.py install for cryptography ... error
Complete output from command /home/parth/gsoc/sample/try/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nvvy22iz/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-tdsypb26-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/parth/gsoc/sample/try/include/site/python3.5/cryptography:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nvvy22iz/cryptography/setup.py", line 335, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 387, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 187, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_openssl.py", line 94, in <module>
extra_link_args=extra_link_args(compiler_type()),
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding
extra_link_args=extra_link_args,
File "/tmp/pip-build-nvvy22iz/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi
ffi = FFI()
File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 56, in __init__
import _cffi_backend as backend
ImportError: /usr/local/lib/python2.7/dist-packages/_cffi_backend.so: undefined symbol: _Py_ZeroStruct
----------------------------------------
Can't rollback cryptography, nothing uninstalled.
Try with
pip install scrapy
or
sudo pip install scrapy
And when you write python3 which version open?