I am trying to install psqlparse in PyCharm but I am getting an error.
The error that occurs during installation is:
pip install psqlparse
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
Collecting psqlparse
Using cached psqlparse-0.2.5.tar.gz (23 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: six in e:\python\pythonproject\venv\lib\site-packages (from psqlparse) (1.16.0)
Building wheels for collected packages: psqlparse
Building wheel for psqlparse (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\psqlparse
copying psqlparse\exceptions.py -> build\lib.win-amd64-3.9\psqlparse
copying psqlparse\nodes.py -> build\lib.win-amd64-3.9\psqlparse
copying psqlparse\__init__.py -> build\lib.win-amd64-3.9\psqlparse
running build_ext
error: [WinError 193] %1 is not a valid Win32 application
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psqlparse
Running setup.py clean for psqlparse
Failed to build psqlparse
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
Installing collected packages: psqlparse
Running setup.py install for psqlparse ... error
error: subprocess-exited-with-error
× Running setup.py install for psqlparse did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running install
e:\python\pythonproject\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and othe
r standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\psqlparse
copying psqlparse\exceptions.py -> build\lib.win-amd64-3.9\psqlparse
copying psqlparse\nodes.py -> build\lib.win-amd64-3.9\psqlparse
copying psqlparse\__init__.py -> build\lib.win-amd64-3.9\psqlparse
running build_ext
error: [WinError 193] %1 is not a valid Win32 application
[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.
╰─> psqlparse
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (e:\python\pythonproject\venv\lib\site-packages)
WARNING: You are using pip version 22.0.4; however, version 22.3 is available.
You should consider upgrading via the 'e:\python\pythonproject\venv\scripts\python.exe -m pip install --upgrade pip' command.
Related
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.
Collecting bpy
Using cached bpy-2.82.1.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Skipping wheel build for bpy, due to binaries being disabled for it.
Installing collected packages: bpy
Running setup.py install for bpy ... error
error: subprocess-exited-with-error
× Running setup.py install for bpy did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/post_install.py -> build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/init.py -> build/lib.linux-x86_64-3.7/blenderpy
copying blenderpy/pre_uninstall.py -> build/lib.linux-x86_64-3.7/blenderpy
running build_ext
Preparing the build environment
Searching for compatible Blender online (this will take a while)
error: [Errno 2] No such file or directory: 'svn': 'svn'
[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.
╰─> bpy
AttributeError: Could not find PyAudio; check installation
I tried to install pyaudio then it says:
PS E:\MU\Sem 4\JARVIS\CODE> pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' 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.
╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I got a problem of installing xfoil python package
Collecting xfoil
Using cached xfoil-1.1.1.tar.gz (12 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\xxx\desktop\curve\venv\lib\site-packages (from xfoil) (1.22.4)
Building wheels for collected packages: xfoil
Building wheel for xfoil (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\xfoil
copying xfoil\model.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\test.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\xfoil.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\__init__.py -> build\lib.win-amd64-cpython-310\xfoil
running build_ext
error: [WinError 2] 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 xfoil
Running setup.py clean for xfoil
Failed to build xfoil
Installing collected packages: xfoil
Running setup.py install for xfoil ... error
error: subprocess-exited-with-error
× Running setup.py install for xfoil did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running install
C:\Users\xxx\Desktop\curve\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build an
d pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\xfoil
copying xfoil\model.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\test.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\xfoil.py -> build\lib.win-amd64-cpython-310\xfoil
copying xfoil\__init__.py -> build\lib.win-amd64-cpython-310\xfoil
running build_ext
error: [WinError 2] 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.
╰─> xfoil
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
How can I deal with it?
Thank you very much
The problem appears to be that the build process is failing, as pip is trying to compile the source code, but it's failing because the prerequisites for this process aren't present.
To make this work, you could install the package using pre-compiled (built) packages. The package has only published built packages for Python 3.7
https://pypi.org/project/xfoil/#files
To use this, create a Python virtual environment that uses Python version 3.7.
I got this working using the Anaconda Python distribution as follows.
First, create a virtual environment using Python version 3.7
conda create -n xfoil python=3.7
pip install xfoil
Because this environment is using Python version 3.7, the built xfoil distribution will be downloaded (the wheel file .whl). The console output is shown below:
Collecting xfoil
Downloading xfoil-1.1.1-cp37-cp37m-win_amd64.whl (442 kB)
|████████████████████████████████| 442 kB 1.6 MB/s
Requirement already satisfied: numpy in c:\users\joe\miniconda3\envs\xfoil\lib\site-packages (from xfoil) (1.19.5)
Installing collected packages: xfoil
Successfully installed xfoil-1.1.1
If you want to build xfoil using a more recent Python version (you're using version 3.10) then follow the build instructions on the xfoil page https://pypi.org/project/xfoil/ under "Building and Installing the Python Module"
I had the same problem, but it as been easily solved by reading the page linked by Joe (https://pypi.org/project/xfoil/).
Just download the file from the Pypi mirror, unpack and install using pip in the directory:
pip install .
My problems was most probably linked to my python version...
Thanks !
when i try to install ta-lib i have this problem, nonetheless i installed before talib($ brew install talib)
Thank you for help or a hint....
$ pip install ta-lib
Collecting ta-lib
Using cached TA-Lib-0.4.24.tar.gz (269 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from ta-lib) (1.21.5)
Building wheels for collected packages: ta-lib
Building wheel for ta-lib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
building 'talib._ta_lib' extension
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/stdio.h:32:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/cdefs.h:758:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from talib/_ta_lib.c:6:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:30:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/string.h:41:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/types.h:78:10: fatal error: 'machine/types.h' file not found
#include <machine/types.h>
^~~~~~~~~~~~~~~~~
3 errors generated.
error: command '/usr/local/Cellar/llvm#9/9.0.1_4/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ta-lib
Running setup.py clean for ta-lib
Failed to build ta-lib
Installing collected packages: ta-lib
Running setup.py install for ta-lib ... error
error: subprocess-exited-with-error
× Running setup.py install for ta-lib did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running install
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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
skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
building 'talib._ta_lib' extension
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:25:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/stdio.h:32:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/cdefs.h:758:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from talib/_ta_lib.c:6:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from talib/_ta_lib.c:6:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:30:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/string.h:41:
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/sys/types.h:78:10: fatal error: 'machine/types.h' file not found
#include <machine/types.h>
^~~~~~~~~~~~~~~~~
3 errors generated.
error: command '/usr/local/Cellar/llvm#9/9.0.1_4/bin/clang' failed with exit code 1
[end of output]