I am trying to run the below command on Linux
pip3.9 install psycopg2
but it does not work as I get the following error message:
Collecting psycopg2
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata (setup.py) ... 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
I have been looking at a bunch of other SO questions but nothing has worked thus far. e.g. running
pip3.9 install setuptools
returns an already satisfied requirement message.
Any help greatly appreciated.
Thanks
Related
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.
I'm getting this error egg:info error
Collecting fuse-python
Using cached fuse-python-1.0.5.tar.gz (49 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
The system cannot find the path specified.
The system cannot find the path specified.
pkg-config unavailable, build terminated
[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.
I did try to make this install from Pypi site.
after a closer look i've found that egg_info file is almost empty no version info.
how to solve it......Thanks for your time.
Collecting psycopg2
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-irgb8yga/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-irgb8yga/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-irgb8yga/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-irgb8yga/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-irgb8yga/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
[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.
As recommended in the log try using psycopg2-binary as package not psycopg2.
That's how I use it and it's working on all different environments.
I am getting below error message. I already installed all the required components mentioned below.
Collecting pyminizip
Using cached pyminizip-0.2.6.tar.gz (261 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pyminizip, since package 'wheel' is not installed.
Installing collected packages: pyminizip
Running setup.py install for pyminizip ... error
error: subprocess-exited-with-error
× Running setup.py install for pyminizip did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running install
running build
running build_ext
building 'pyminizip' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[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.
╰─> pyminizip
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.