I installed Python and pip today (so they are up-to-date). I tried to install "provers", and got the following error message.
C:\Users\pace_nielsen>pip install provers
Collecting provers
Using cached provers-0.1.18.tar.gz (23 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: provers
Building wheel for provers (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
C:\Users\pace_nielsen\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running bdist_wheel
running build
running build_py
error: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for provers
Running setup.py clean for provers
Failed to build provers
Installing collected packages: provers
Running setup.py install for provers ... error
error: subprocess-exited-with-error
× Running setup.py install for provers did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
C:\Users\pace_nielsen\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running install
C:\Users\pace_nielsen\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(
running build
running build_py
error: [WinError 2] The system cannot find the file specified
[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.
╰─> provers
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I've looked online for any clue how to fix this problem, and tried some basic trouble-shooting. I've seen suggestions to install other packages (like cmake) and have done that without problem. But I don't know what to try next.
I am trying to install the python package called IBM_DB.
In VS Code terminal I used command pip install ibm_db to install the package but it did not work.
Here I attach the errors which I encountered. Please anyone help me.
PS CUsersCarlos Toledano
pip install ibm_db
Collecting ibm_db
Using cached ibm_db-3.1.1.tar.gz (1.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages ibm_db
Building wheel for ibm_db (pyproject.toml) ... error
error subprocess-exited-with-error
× Building wheel for ibm_db (pyproject.toml) did not run successfully.
│ exit code 1
╰─ [785 lines of output]
Detected 64-bit Python
I am trying to install IBM_DB in Visual Studio Code terminal.
Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well:
pip install chatterbot
Collecting chatterbot
Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting pint>=0.8.1
Downloading Pint-0.19.2.tar.gz (292 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.0/292.0 kB 1.6 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyyaml<5.2,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Preparing metadata (setup.py) ... done
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Collecting setuptools
Using cached setuptools-65.0.1-py3-none-any.whl (1.2 MB)
Collecting wheel<0.33.0,>0.32.0
Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-win_amd64.whl (36 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 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
[6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\oguls\AppData\Local\Temp\pip-install-qce7tdof\preshed_546a51fe26c74852ab50db073ad57f1f\setup.py", line 9, in <module>
from distutils import ccompiler, msvccompiler
ImportError: cannot import name 'msvccompiler' from 'distutils' (C:\Users\oguls\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\__init__.py)
[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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
I don't specifically know which packages cause this error, a lot of them install without any problems.
I have tried updating pip, changing environment variables and other possible solutions I've found on the internet, but nothing seems to work.
Edit: The package I am trying to install supports my Python version.
The real error in your case is:
ImportError: cannot import name 'msvccompiler' from 'distutils'
It occured because setuptools has broken distutils in version 65.0.0 (and has already fixed it in version 65.0.2). According to your log, the error occured in your global setuptools installation (see the path in error message), so you need to update it with the following command:
pip install -U setuptools
Those packages, however, may still not get installed or not work properly as the module causing this error doesn't support compiler versions needed for currently supported versions of Python.
Same thing happened with me, it was basically pip's version problem.
Try upgrading pip to latest version --22.3.1 and downgrade the python version from latest version --3.10.00 to 3.9.13...
pip --version check for pip's version
pip install notebook --upgrade -command to update pip to latest version
This worked for me
pip install xhtml2pdf
I got the error below:
PS D:\pace_at\PACE-AT-NewTech> docker exec pace_at pip install xhtml2pdf
Collecting xhtml2pdf
Using cached xhtml2pdf-0.2.8-py3-none-any.whl (256 kB)
Collecting arabic-reshaper>=2.1.0
Downloading arabic_reshaper-2.1.3-py3-none-any.whl (20 kB)
Collecting Pillow>=8.1.1
Using cached Pillow-9.1.1-cp38-cp38-musllinux_1_1_x86_64.whl (3.2 MB)
Collecting PyPDF3>=1.0.5
Downloading PyPDF3-1.0.6.tar.gz (294 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.8/294.8 kB 1.9 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting python-bidi>=0.4.2
Using cached python_bidi-0.4.2-py2.py3-none-any.whl (30 kB)
Collecting reportlab>=3.5.53
Using cached reportlab-3.6.10.tar.gz (4.5 MB)
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
╰─> [10 lines of output]
##### setup-python-3.8.8-linux-x86_64: ================================================
##### setup-python-3.8.8-linux-x86_64: Attempting build of _rl_accel
##### setup-python-3.8.8-linux-x86_64: extensions from 'src/rl_addons/rl_accel'
##### setup-python-3.8.8-linux-x86_64: ================================================
##### setup-python-3.8.8-linux-x86_64: ===================================================
##### setup-python-3.8.8-linux-x86_64: Attempting build of _renderPM
##### setup-python-3.8.8-linux-x86_64: extensions from 'src/rl_addons/renderPM'
##### setup-python-3.8.8-linux-x86_64: ===================================================
##### setup-python-3.8.8-linux-x86_64: will use package libart 2.3.21
!!!!! cannot find ft2build.h
[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.
Adding freetype-dev to your Dockerfile will resolve this, eg.:
RUN apk update \
&& apk add postgresql-dev gcc python3-dev musl-dev freetype-dev
I was trying to install mega.py, for a project I'm working on that needs the files to be uploaded to the Mega Cloud Server, using the command pip install mega.py and the following is shown in the cmd.
Collecting mega.py
Using cached mega.py-1.0.8-py2.py3-none-any.whl (19 kB)
Collecting pycryptodome<4.0.0,>=3.9.6
Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting tenacity<6.0.0,>=5.1.5
Using cached tenacity-5.1.5-py2.py3-none-any.whl (34 kB)
Collecting pathlib==1.0.1
Using cached pathlib-1.0.1.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
╰─> [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.
Can anyone help me out in figuring out what I should do to resolve this? I've been trying out solutions for this problem for a long time now!