Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I got an error when I used "pip install -r requirements.txt" to install the build dependencies of the code "https://github.com/allenai/sequential_sentence_classification".
I used Linux.
× Running setup.py install for preshed did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
/opt/conda/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running install
/opt/conda/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
building 'preshed.maps' extension
gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/include/python3.10 -I/opt/conda/include/python3.10 -c preshed/maps.cpp -o build/temp.linux-x86_64-cpython-310/preshed/maps.o -O3 -Wno-strict-prototypes -Wno-unused-function
gcc: error: preshed/maps.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 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.
╰─> preshed
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[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 have tried the solutions searched online as follows:
apt-get install build-essential
and
apt-get install python3-dev
But it still returns the same error.
It is very appreciated if anybody could help me to solve this problem.
Thanks!
I have solved this problem by creating a new conda environment, and set the python==3.6.
I am not very clear about the true problem. But anyway it has been solved.
Thank you all!
Related
I am working on a code which will require me to parse the bitcoin data for that i am using blockchain parser package which i found from the github repo below
https://github.com/alecalve/python-bitcoin-blockchain-parser
I tried installing pip3 install blockchain_parse and i also tried pip3 install plyvel and i am only getting the following error:
Defaulting to user installation because normal site-packages is not writeable
Collecting blockchain_parser
Using cached blockchain_parser-0.1.5-py3-none-any.whl (29 kB)
Requirement already satisfied: python-bitcoinlib==0.11.0 in /Users/krina/Library/Python/3.9/lib/python/site-packages (from blockchain_parser) (0.11.0)
Collecting plyvel==1.2.0
Using cached plyvel-1.2.0.tar.gz (145 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: plyvel
Building wheel for plyvel (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/plyvel
copying plyvel/_version.py -> build/lib.macosx-10.9-universal2-cpython-39/plyvel
copying plyvel/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/plyvel
running build_ext
building 'plyvel._plyvel' extension
creating build/temp.macosx-10.9-universal2-cpython-39
creating build/temp.macosx-10.9-universal2-cpython-39/plyvel
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c plyvel/_plyvel.cpp -o build/temp.macosx-10.9-universal2-cpython-39/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
plyvel/_plyvel.cpp:4:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/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 plyvel
Running setup.py clean for plyvel
Failed to build plyvel
Installing collected packages: plyvel, blockchain_parser
Running setup.py install for plyvel ... error
error: subprocess-exited-with-error
× Running setup.py install for plyvel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running install
/Users/krina/Library/Python/3.9/lib/python/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
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/plyvel
copying plyvel/_version.py -> build/lib.macosx-10.9-universal2-cpython-39/plyvel
copying plyvel/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/plyvel
running build_ext
building 'plyvel._plyvel' extension
creating build/temp.macosx-10.9-universal2-cpython-39
creating build/temp.macosx-10.9-universal2-cpython-39/plyvel
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c plyvel/_plyvel.cpp -o build/temp.macosx-10.9-universal2-cpython-39/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
plyvel/_plyvel.cpp:4:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/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: legacy-install-failure
× Encountered error while trying to install package.
╰─> plyvel
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried to create a virtual environment as well which is also not working.
Can someone make me understand what is wrong here and how can i solve it and if there are any other blockchain parsers that i can use. Thank you!
blockchain-parser only supports plyvel 1.2.0
plyvel 1.2.0 only support Python 3.8
Please check your python version is correct.
https://plyvel.readthedocs.io/en/latest/news.html
Try this:
brew install leveldb
pip install plyvel==1.2.0
pip install blockchain-parser
I am trying to install the package mordecai. The installation guide is here:https://github.com/openeventdata/mordecai
I tried installing it using the terminal in VS Code via the command pip install mordecai, which resulted in a long error that ends with this:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for blis
Running setup.py clean for blis
Failed to build thinc preshed blis
Installing collected packages: wrapt, wasabi, plac, cymem, wheel, tqdm, srsly, six, setuptools, preshed, numpy, murmurhash, Cython, thinc_gpu_ops, blis, thinc
Running setup.py install for preshed: started
Running setup.py install for preshed: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for preshed did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
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
building 'preshed.maps' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c preshed/maps.cpp -o build/temp.macosx-10.9-universal2-cpython-310/preshed/maps.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: error: no such file or directory: 'preshed/maps.cpp'
clang: error: no input files
error: command '/usr/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: legacy-install-failure
× Encountered error while trying to install package.
╰─> preshed
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[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 thought that these questions might have an answer, but they have not been able to answer my question.
How can I install packages using pip according to the requirements.txt file from a local directory?
How to install PIL with pip on Mac OS?
How to update/upgrade a package using pip?
How do I install pandas into visual studios code?
I looked through many questions on this site, but cannot seem to find an answer as to what I can do to install this package.
I have also tried the following, which produces the same error message:
python3 -m venv mordecai-env
source mordecai-env/bin/activate
pip3 install mordecai
Please let me know if I can make my attempts or the question more clear, or if any other information is needed.
sudo -H pip install pyaudio --global-option="build_ext" --global-option="-I/opt/homebrew/include" --global-option="-L/opt/homebrew/lib"
WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
Collecting pyaudio
Downloading PyAudio-0.2.12.tar.gz (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.9/42.9 kB 872.0 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-cpython-39
copying src/pyaudio.py -> build/lib.macosx-12-arm64-cpython-39
running build_ext
building '_portaudio' extension
creating build/temp.macosx-12-arm64-cpython-39
creating build/temp.macosx-12-arm64-cpython-39/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DMACOSX=1 -I/usr/local/include -I/usr/include -I/opt/homebrew/Cellar/python#3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-12-arm64-cpython-39/src/_portaudiomodule.o
src/_portaudiomodule.c:31:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/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 pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
When I run the command, no matter what - pip install pyaudio, or the above command with/without sudo it always gives the same error. I see this is a very common issue. I double checked the path and portaudio in the directory used in the command. I am at a loss and really do not understand why it is not working. I also tried building pyaudio directly from the file itself and it still doesn't work. Does anyone have any suggestions?
SOLVED: I found this: https://qiita.com/yukilab/items/d50a10f1d46c44ae0757
even though it is in another language I was able to get it working. It is similar to what was suggested by #Bob th but slightly different.
In essence I made a file .pydistutils.cfg and added
[build_ext]
include_dirs=/opt/homebrew/include
library_dirs=/opt/homebrew/lib
I'm trying to use OpenEXR module on blender's 3.1.2 script but I can't import it. I can import it using my python 3.8.10 installed.
I first install it using :
pip install openexr
pip3 install openexr
sudo apt install libopenexr-dev
And it works fine on my python 3.8.10 command line.
I then tried to install it using the blender's python version :
./python3.10 -m pip install openexr
but I get that error from gcc :
Defaulting to user installation because normal site-packages is not writeable
Collecting openexr
Using cached OpenEXR-1.3.8.tar.gz (11 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: openexr
Building wheel for openexr (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Looking for libOpenEXR...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
copying Imath.py -> build/lib.linux-x86_64-3.10
running build_ext
building 'OpenEXR' extension
creating build/temp.linux-x86_64-3.10
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/sqlite/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/bzip2/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/lzma/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/zlib/include -fPIC -fPIC -fPIC -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/usr/include/Imath -I/usr/local/include/Imath -I/opt/local/include/Imath -I/snap/blender/2106/3.1/python/include/python3.10 -c OpenEXR.cpp -o build/temp.linux-x86_64-3.10/OpenEXR.o -g -DVERSION="1.3.8"
OpenEXR.cpp:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' 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 openexr
Running setup.py clean for openexr
Failed to build openexr
Installing collected packages: openexr
Running setup.py install for openexr ... error
error: subprocess-exited-with-error
× Running setup.py install for openexr did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Looking for libOpenEXR...
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
copying Imath.py -> build/lib.linux-x86_64-3.10
running build_ext
building 'OpenEXR' extension
creating build/temp.linux-x86_64-3.10
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/sqlite/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/bzip2/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/lzma/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/zlib/include -fPIC -fPIC -fPIC -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/usr/include/Imath -I/usr/local/include/Imath -I/opt/local/include/Imath -I/snap/blender/2106/3.1/python/include/python3.10 -c OpenEXR.cpp -o build/temp.linux-x86_64-3.10/OpenEXR.o -g -DVERSION="1.3.8"
OpenEXR.cpp:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 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.
╰─> openexr
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Any way to solve that issue so I can use OpenEXR on blender or make blender to use python installed instead of it's own version ?
I'm on ubuntu 20.04
I finally get it to work by copying the files from OpenEXR-1.3.8 into the folder of the python executable and then installing OpenEXR.
1- Download OpenEXR-1.3.8 from here.
2- Copy all the files into your blender python executable, for me it was :
/homa/jros/Downloads/blender-2.90.0-linux64/2.90/python/bin
3- Run the executable with those parameters -m setup.py install like so
./python3.7m -m setup.py install
and it should work. You might need to install those as well :
sudo apt install python3.10-dev
pip install openexr
pip3 install openexr
sudo apt install libopenexr-dev
This question already has answers here:
Error on "pip install -U channels" command using for otree (Running setup.py bdist_wheel for twisted ... error)
(1 answer)
Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
(37 answers)
Closed 9 months ago.
I'm trying to install pyAudio using pip for a Voice Assistant project I'm building. When I try to run the code, it returns this error saying no module named 'pyaudio'. So I assumed I have to install pyaudio again in order to make it work.
But while installing pyaudio, I'm getting this error. I've tried many methods like installing portaudio, clearing cache of pip, updating, uninstalling, re-installing packages, pip and python.
I'm fairy new to python so please don't mind if this is a rookie error.
macOS 12.3.1, Python 3.9.1, env virtual environment
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-39
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-cpython-39
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-cpython-39
creating build/temp.macosx-10.9-x86_64-cpython-39/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Users/setukumar/Downloads/Virtual-Personal-Assistant-using-Python-master/env/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/_portaudiomodule.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/gcc' 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 pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
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
╰─> [15 lines of output]
running install
/Users/setukumar/Downloads/Virtual-Personal-Assistant-using-Python-master/env/lib/python3.9/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
creating build
creating build/lib.macosx-10.9-x86_64-cpython-39
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-cpython-39
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-cpython-39
creating build/temp.macosx-10.9-x86_64-cpython-39/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Users/setukumar/Downloads/Virtual-Personal-Assistant-using-Python-master/env/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/_portaudiomodule.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/gcc' failed with exit code 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.
╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Try this one:
sudo apt-get install portaudio19-dev
Then Try again