I am unable to get python to recognize that pkg-config has been installed. The end goal is to be able to download the python-binance-chain library: https://github.com/sammchardy/python-binance-chain but at this moment when I use pip to install the library I receive the following error message:
ERROR: Command errored out with exit status 1:
command: 'c:\users\jpeterson\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jpeterson\\AppData\\Local\\Temp\\pip-install-0459uu9t\\secp256k1_ba55524266274c10b617991dff5a4d87\\setup.py'"'"'; __file__='"'"'C:\\Users\\jpeterson\\AppData\\Local\\Temp\\pip-install-0459uu9t\\secp256k1_ba55524266274c10b617991dff5a4d87\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\jpeterson\AppData\Local\Temp\pip-pip-egg-info-fzc7jgqc'
cwd: C:\Users\jpeterson\AppData\Local\Temp\pip-install-0459uu9t\secp256k1_ba55524266274c10b617991dff5a4d87\
Complete output (1 lines):
'pkg-config' is required to install this package. Please see the README for details.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I have downloaded the following pkg-config files:
pkg-config_0.26-1_win32
glib_2.28.8-1_win32
gettext-runtime_0.18.1.1-2_win32
However but I don't know where they need to be for python to recognize that pkg-config has been installed. I have referred to the following stackoverflow inquiry: How to install pkg config in windows? but would ideally not have to install a number of different tools, especially considering I am not sure if they will enable the end goal of installing the python-binance-chain library.
Related
This is the error i get. it was working fine before, then i reinstalled python(i have added it to the system variables) and installed vscode if thats relevant.but even with windows terminal i get the same error. I did download the c++ with tools, followed the link and downloaded and installed it.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\chaitali\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Chaitali\\AppData\\Local\\Temp\\pip-install-3h22t0nk\\twisted\\setup.py'"'"'; __file__='"'"'C:\\Users\\Chaitali\\AppData\\Local\\Temp\\pip-install-3h22t0nk\\twisted\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Chaitali\AppData\Local\Temp\pip-record-ttosnncb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\chaitali\appdata\local\programs\python\python39\Include\Twisted' Check the logs for full command output.
Try to install Twisted manually:
Download your version from this Python Extension Packages website and install it using (if you have Python 3.9 and win32 platform):
pip3 install Twisted‑20.3.0‑cp39‑cp39‑win32.whl
After that you'll be able to install Scrapy using:
pip3 install scrapy
Hi currently i had PyObjC-core as one of the dependencies in my requirements.txt file, when i try to run
pip install -r requirements.txt
it return the following error:
Collecting pyobjc-core==6.1
Using cached https://files.pythonhosted.org/packages/3a/80/0cdb2130b86a984e4765beb93135aa9c2120fd64be1a27e1c7cb31c719bc/pyobjc-core-6.1.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vj52r5i1/pyobjc-core/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vj52r5i1/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-vj52r5i1/pyobjc-core/pip-egg-info
cwd: /tmp/pip-install-vj52r5i1/pyobjc-core/
Complete output (2 lines):
running egg_info
error: PyObjC requires macOS to build
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I looked for solutions online but still haven't found any answers.
my pip version is 20.0.2 and running on python 3.7
I also had tried with manual install pip install pyobjc-core but still no luck
As mentioned also here https://github.com/asweigart/pyautogui/issues/381, I believe currently the only solution is installing an older release of pyautogui:
https://pypi.org/project/PyAutoGUI/0.9.50/#history.
For instance: pip3 install PyAutoGUI==0.9.48
I came here with a slightly different error when trying to pip install pyobjc-core latest (8.1) on MacOS 10.15.7. If you are seeing the following compilation error from gcc ...
Modules/objc/OC_PythonNumber.m:553:39: error: unused parameter 'zone' [-Werror,-Wunused-parameter]
... then I would refer you to [this issue] on github 1
When I install mysql-python using pip on mac os, I always get this error, how can I solve this problem?
ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/usr/local/libressl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-UEOYdV/mysql-python/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-UEOYdV/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-EgQ8P0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Try:
pip install --upgrade setuptools
As AMC posted in a comment, this error can occur when using the builtin MacOS Python 2. Use a tool like pyenv to install a standard Python distribution, create a virtual environment, and try again.
This is my first time to install a python package.
I want to install flopy package
The path to anaconda3 at my PC is
C:\Users\user\AppData\Local\Continuum\anaconda3
Following this video, I typed in anaconda prompt
cd "C:\Users\user\AppData\Local\Continuum\anaconda3"
python -m pip install flopy
I got the following
Collecting flopy
Using cached https://files.pythonhosted.org/packages/65/f3/7d86d8d83e6d71a05557796d303604c24c9896743be861433471d576bbb7/flopy-3.2.12.zip
and this error window appeared
The ordinal 242 could not be located in the dynamic link library
c:\Users\user\AppData\Local\Continuum\anaconda3\Library\bin\mkl_intel_thread.dll.
In anconda prompt
ERROR: Command errored out with exit status 2:
command: 'C:\Users\user\AppData\Local\Continuum\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-p3cq3l3y\\flopy\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-p3cq3l3y\\flopy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\user\AppData\Local\Temp\pip-install-p3cq3l3y\flopy\
Complete output (2 lines):
INTEL MKL ERROR: The operating system cannot run %1. mkl_intel_thread.dll.
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
----------------------------------------
ERROR: Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.
mkl_intel_thread_dll is in this path
where mkl_intel_thread.dll
C:\Users\user\AppData\Local\Continuum\anaconda3\Library\bin\mkl_intel_thread.dll
Any suggestions to fix this error will be highly appreciated
That video is old and just bad advice in terms of Conda best practice. FloPy is available on the Conda Forge channel in Anaconda Cloud, which can be installed with
conda install -c conda-forge flopy
I am working on a speech recognition software and wanted to test out pocketsphinx and have tried to install it using pip on windows 10 python version 3.8 and it wont download usually i would fix the problem by downloading it as binary file and then trying to install it but it tells me that the whl file is unsupported and thank you all in advance.
Down below is the error message I got.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\yeetgod\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\yeetgod\AppData\Local\Temp\pip-record-fcvz7sp8\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\yeetgod\AppData\Local\Temp\pip-install-aims1y79\pocketsphinx\
Complete output (6 lines):
running install
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig.exe -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
error: command 'swig.exe' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\yeetgod\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\yeetgod\AppData\Local\Temp\pip-record-fcvz7sp8\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I expected the binary files to work but the gave me this error message
ERROR: pocketsphinx-0.1.15-cp36-cp36m-win32.whl is not a supported wheel on this platform.
And then i tried another binary file (the win64 amd one) and it gave me this error:
ERROR: pocketsphinx-0.1.15-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
ERROR: pocketsphinx-0.1.15-cp36-cp36m-win32.whl is not a supported wheel on this platform
You're trying to install a wheel for Python 3.6 to Python 3.8. That doesn't work.
The latest release of pocketsphinx was released at Jun 4, 2018, more than a year ago. Python 3.8 didn't exist at that time so they don't provide wheels for it.
Actually they don't even have wheels for Python 3.7. Either you have to use Python 3.6 or compile the project from sources. To compile from sources you need a number of prerequisites.
The error
error: command 'swig.exe' failed: No such file or directory
means that you miss one of the prerequisites — SWIG.
1. Summary
Install SWIG separately to your machine.
2. Disclaimer
This answer is relevant for April 2020. In the future, its data may be outdated.
This solution may not work on a different environment.
3. Scoop
Scoop — the simple way to install SWIG for Windows users.
scoop install swig
4. Behavior
4.1. Before
D:\SashaDebugging\KiraMicrophone>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.15.tar.gz (29.1 MB)
Installing collected packages: pocketsphinx
Running setup.py install for pocketsphinx … error
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SashaChernykh\\AppData\\Local\\Temp\\pip-install-n5cb82uz\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\SashaChernykh\\AppData\\Local\\Temp\\pip-install-n5cb82uz\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\SashaChernykh\AppData\Local\Temp\pip-record-dq_syyxw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pocketsphinx'
cwd: C:\Users\SashaChernykh\AppData\Local\Temp\pip-install-n5cb82uz\pocketsphinx\
Complete output (6 lines):
running install
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
swig.exe -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
error: command 'swig.exe' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SashaChernykh\\AppData\\Local\\Temp\\pip-install-n5cb82uz\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\SashaChernykh\\AppData\\Local\\Temp\\pip-install-n5cb82uz\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\SashaChernykh\AppData\Local\Temp\pip-record-dq_syyxw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pocketsphinx' Check the logs for full command output.
4.2. After
D:\SashaDebugging\KiraMicrophone>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.15.tar.gz (29.1 MB)
Installing collected packages: pocketsphinx
Running setup.py install for pocketsphinx … done
Successfully installed pocketsphinx-0.1.15
I launched simple LiveSpeech script:
from pocketsphinx import LiveSpeech
for phrase in LiveSpeech(): print(phrase)
PocketSphinx worked for me:
D:\SashaDebugging\KiraMicrophone>python KiraPocketSphinx.py
Allocating 32 buffers of 2500 samples each
test
5. Testing environment
Windows 10.0.18363 Pro N for Workstations 64-bit EN
Python 3.8.2
PocketSphinx 0.1.15
SWIG 4.0.1
This is the second time I'm coming across this error today, the first was with pyaudio. What i did was I went to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio, looked for the wheels I wanted to download for pyaudio and pocketsphinx (I use Python 3.8.2 on a Windows 10 so I downloaded the cp-38-cp-38_win_amd64 wheels). After downloading you simply run pip install path/to/downloaded/wheel.