I'm facing the issue when running poetry install command in my new Macbook Pro using Apple M1 chip and MacOS Monterey. I tried many suggestions so far but still cannot make it fixed.
Python version: 3.8.12
>>> poetry install
Installing dependencies from lock file
Package operations: 20 installs, 0 updates, 0 removals
• Installing scipy (1.6.0): Failed
EnvCommandError
Command ['/Users/<retacted>/Library/Caches/pypoetry/virtualenvs/reporting-executor-3zOoUFwf-py3.8/bin/pip', 'install', '--no-deps', 'file:///Users/<retacted>/Library/Caches/pypoetry/artifacts/e2/fc/a9/d781fc7053c9e0aa0b94b47220fee30ba4ef114e7d11b36b3cc68b1b95/scipy-1.6.0.tar.gz'] errored with the following return code 1, and output:
Processing /Users/<retacted>/Library/Caches/pypoetry/artifacts/e2/fc/a9/d781fc7053c9e0aa0b94b47220fee30ba4ef114e7d11b36b3cc68b1b95/scipy-1.6.0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/<retacted>/Library/Caches/pypoetry/virtualenvs/reporting-executor-3zOoUFwf-py3.8/bin/python /Users/<retacted>/Library/Caches/pypoetry/virtualenvs/reporting-executor-3zOoUFwf-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/54/n12zwf1n74vg5knvnd37ph880000gp/T/tmpusexpj06
cwd: /private/var/folders/54/n12zwf1n74vg5knvnd37ph880000gp/T/pip-req-build-xbw8rqq2
Complete output (4 lines):
setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/54/n12zwf1n74vg5knvnd37ph880000gp/T/pip-modern-metadata-1_oeqwwo'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Error: 'None' must be installed before running the build.
Here is what I tried:
Running the terminal under Rosetta mode
I can be able to install scipy via the command arch -arm64 pip install scipy without issue but the version is 1.7.3
Tried arch -arm64 pip install scipy==1.6.0 getting the error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/54/n12zwf1n74vg5knvnd37ph880000gp/T/pip-modern-metadata-rsi6te2b'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Error: 'None' must be installed before running the build.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
We had a similar issue and it seems to be a Python version issue: https://github.com/python-poetry/poetry/issues/2629
We downgraded to Python 3.7 for example. Maybe try other versions that is still fine for your project.
Related
I have installed cmake and added it to path.
Here is what the error looks like when I try to install dlib using pip:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts>pip install dlib
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
ERROR: CMake must be installed to build dlib
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
C:\Users\Zack\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
ERROR: CMake must be installed to build dlib
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried downloading the dlib wheel and installing it like that:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts>pip install "D:\Users\ZACK\Downloads\dlib-18.17.100-cp27-none-win32.whl"
Output
ERROR: dlib-18.17.100-cp27-none-win32.whl is not a supported wheel on this platform.
I tried installing the wheel with a url:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts> pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
Output
ERROR: dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
Collecting zbar
Using cached zbar-0.10.zip (31 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Installing collected packages: zbar
Running setup.py install for zbar: started
Running setup.py install for zbar: finished with status 'error'
DEPRECATION: zbar is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
error: subprocess-exited-with-error
Running setup.py install for zbar did not run successfully.
exit code: 1
[5 lines of output]
C:\Users\Владислав\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
decoder.c
C:\Users\‚« ¤Ёб« ў\AppData\Local\Temp\pip-install-1cqnzmpz\zbar_ab9597765fa8408b89ecd86fa8b953eb\zbarmodule.h(26): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о票Ґ: zbar.h: No such file or directory,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
zbar
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Im trying download mscc
im trying:
python -m pip install –upgrade pip
pip install –upgrade wheel
pip install –upgrade setuptools
pip install gensim
I dont now what i must do
Im using poetry for my project and I want to add some dependencies. unfortunately, some of those dependencies that are necessary are very old packages like suds-jutrko and they need to be built with setuptools with a version lower >=58. Therefore I cannot install it with peotry, it gives me and many people facing the same issue this error:
• Installing suds-jurko (0.6): Failed
EnvCommandError
Command ['/Users/jbron/Documents/Work/hello_world/venv/bin/pip', 'install', '--no-deps', 'file:///Users/jbron/Library/Caches/pypoetry/artifacts/58/18/d9/8ff4a5afaae29cf0fcbd3be79f41ee3a11976cccd9a9bb1784fc1c7d7b/suds-jurko-0.6.zip'] errored with the following return code 1, and output:
Looking in indexes: https://devpi-eu.dolby.net/common/prod
Processing /Users/jbron/Library/Caches/pypoetry/artifacts/58/18/d9/8ff4a5afaae29cf0fcbd3be79f41ee3a11976cccd9a9bb1784fc1c7d7b/suds-jurko-0.6.zip
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in suds-jurko setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
Its due to the fact that setuptools drops support for use_2to3.
Is there a way to still use Poetry by having packages like that built using different tools?
while I was developing in the Build main section got these errors
Collecting importlib==1.0.4
Downloading importlib-1.0.4.zip (7.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
! Push rejected, failed to compile Python app.
! Push failed
I can see in the error this line: ERROR: Can not execute setup.py since setuptools is not available in the build environment which means you haven't added the setuptools module to the build environment of the project. Try to use pip install setuptools to install the module.
I am trying to install aerospike in my virtualenv by using below command
pip install aerospike==5.0.0
but it is unable to install. It is throwing below error
Collecting aerospike==5.0.0
Using cached aerospike-5.0.0.tar.gz (182 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: aerospike
Building wheel for aerospike (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [150 lines of output]
info: Executing ./scripts/aerospike-client-c.sh
# ... very long output ... #
ld: warning: directory not found for option '-L/usr/local/opt/openssl#1.1/lib'
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> aerospike
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I have tried to install wheel and then install this package but it's not working.
I have also tried by installing rosetta2 on mac but it didn't work.
Also, if it requires whole output do let me know where I can share that publish the link here in my question.