Problem:
I am using python 2.7 on my Windows 10 computer.
When I run
pip install pyenv
I get the error shown below.
This is the only pip module that I have run into that I cannot install successfully. I'm not sure why this happens. Any ideas?
Error Message:
pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv: started
Running setup.py bdist_wheel for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\u sers\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open )(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_w heel -d c:\users\user\appdata\local\temp\tmprb9n7epip-wheel- --python-tag cp27:
running bdist_wheel
running build
installing to build\bdist.win32\wheel
running install
Cloning into 'C:/Users/user/.pyenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-doctor'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-installer'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-update'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-virtualenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 257, in run
self.distinfo_dir)
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 393, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build\bdist.win32\wheel\.\pyenv-20150113.1-py2.7.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv: started
Running setup.py install for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\ \users\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', op en)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" insta ll --record c:\users\user\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-ex ternally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata \\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\mse dmon\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-externally-managed --compi le" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\
The "pypi" page of pyvenv mentions:
The PyPi support is not tested by many users yet, so the direct way
ist still recommended if you want to play it safe.
The authors of the package recommend to use their dedicated installation script.
Related
I am not able to install librosa in Ubuntu 18.04. I have tried the following commands, all are failed.
pip install librosa
python3.8 -m pip install librosa
sudo pip install librosa
pip install -u librosa
The below error I am getting:
Failed cleaning build dir for numba
Running setup.py bdist_wheel for resampy ... done
Stored in directory: /home/nageshas/.cache/pip/wheels/fa/c1/56/e0e12c6f7f3d2cdea9712b35136a2d40a7817c6210ec096485
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmphpnrxd05pip-wheel- --python-tag cp38:
running bdist_wheel
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built librosa audioread resampy
Failed to build numba llvmlite
Installing collected packages: audioread, decorator, joblib, llvmlite, numpy, setuptools, numba, chardet, urllib3, idna, certifi, requests, pyparsing, packaging, appdirs, pooch, scipy, six, resampy, threadpoolctl, scikit-learn, pycparser, cffi, soundfile, librosa
Running setup.py install for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-f20fjedr-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-build-zrky3kzn/llvmlite/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
running build_ext
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
I came across the same issues too.
There are several steps that helped me, but I cannot define the exact one. So I will list all:
First, update setuptools and wheel
python3 -m pip install --upgrade pip setuptools wheel
Second
python setup.py bdist_wheel
Try to install the previous version of librosa
pip install librosa==0.7.2
I hope the first two steps will help
I wanted to install Talib in order to write code for KDJ indicator. However, I couldn't install it.
I already downloaded the file from https://www.lfd.uci.edu/~gohlke/pythonlibs/, and wrote pip install Talib in Anaconda prompt, but then it comes out error below:
----------------------------------------
Failed building wheel for talib
Running setup.py clean for talib
Failed to build talib
Installing collected packages: talib
Running setup.py install for talib ... error
Complete output from command "C:\Users\Jun Yap\Anaconda3\python.exe" -u -c "import setuptools,
tokenize;__file__='C:\\Users\\JUNYAP~1\\AppData\\Local\\Temp\\pip-install-dgdxm9b0\\talib\\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\JUNYAP~1\AppData\Local\Temp\pip-record-w0546kkg\install-record.txt --single-version-externally-managed --compile:
running install
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\setup.py", line 47, in <module>
'talib = talib.cli:cli',
File "C:\Users\Jun Yap\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Jun Yap\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Jun Yap\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\setup.py", line 20, in run
raise Exception("You probably meant to install and run ta-lib")
Exception: You probably meant to install and run ta-lib
dgdxm9b0\\talib\\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\JUNYAP~1\AppData\Local\Temp\pip-
record-w0546kkg\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\
Can I know whether there is any other ways to install Talib in python?
Thank you.
The error says:
You probably meant to install and run ta-lib
And indeed, the description on PyPI says that talib is "a package to prevent exploit".
A look at the package source confirms this because it contains nothing more than a couple of stubs that return "You probably meant to install ta-lib".
To install the "real" ta-lib, you should run pip install ta-lib.
I am trying to install ibm_db module for python using pip install but getting below error.
" C:\Users\n087514>pip install ibm_db Collecting ibm-db Using cached
https://repo-man.aetna.com/nexus/repository/ae-pypi-group/packages/f8/6f/5f8186cb31021409235a948be5e29d77761ef92747a101360003747c4105/ibm_db-2.0.8.tar.gz
Installing collected packages: ibm-db Running setup.py install for
ibm-db ... error
Complete output from command "c:\program files (x86)\python 3.5\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\n087514\AppData\Local\Temp\pip-g_xrj1vq-record\install-record.txt
--single-version-externally-managed --compile:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py",
line 17, in
os.rename('tests','test_2')
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'tests' -> 'test_2'
---------------------------------------- Command ""c:\program files (x86)\python 3.5\python.exe" -u -c "import setuptools,
tokenize;file='C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\n087514\AppData\Local\Temp\pip-g_xrj1vq-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\"
Anyone has any idea what needs to be done?
Thanks in advance!
Try:
pip install "ibm_db==2.0.8a"
I am trying to download the pyahocorasick package on my Windows 10 system using pip.
On my command line, I wrote-
pip install pyahocorasick
It gave the following output -
Collecting pyahocorasick
Using cached pyahocorasick-1.1.4.tar.bz2
Installing collected packages: pyahocorasick
Running setup.py install for pyahocorasick ... error
Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\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\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
failed to import Cython: DLL load failed: %1 is not a valid Win32 application.
error: Cython does not appear to be installed
----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\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\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Krishna\AppData\Local\Temp\pip-build-b7a1mq0t\pyahocorasick\
Then I tried to see if Cython is in fact installed, so I wrote-
Cython version
and the output was -
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\Scripts\cython.exe\__main__.py", line 5, in <module>
File "C:\Python34\lib\site-packages\Cython\Compiler\Main.py", line 28, in <module>
from .Scanning import PyrexScanner, FileSourceDescriptor
ImportError: DLL load failed: %1 is not a valid Win32 application.
And finally I tried -
install Cython
And the output was -
Requirement already satisfied: Cython in c:\python34\lib\site-packages
So my question is - if Cython is already installed, why does installing the package pyahocorasick give the error - Cython does not appear to be installed? And how can I fix this problem?
I'm attempting to setup PyCharm with a library provided for my introductory computer science course, but it appears that because of my version of python I am unable to install PySide, which is necessary for the library's imports. python --version outputs
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)
when I try to install pyside with pip install pyside I received the following error:
Collecting PySide
Using cached PySide-1.2.4.tar.gz
Complete output from command python setup.py egg_info:
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-iyhkri8c/PySide/
I've tried changing my version of python to 2.7, which looks like it would be supported, by installing pysel and running sudo pysel 2.7.12 but that gives me the following error:
Traceback (most recent call last):
File "//anaconda/bin/pysel", line 9, in <module>
load_entry_point('pythonselect==1.3', 'console_scripts', 'pysel')()
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 287, in main
p.set_curr_python(sys.argv[1])
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 212, in set_curr_python
% (pyver_dir, pyver))
pythonselect.pysel.Error: '/Library/Frameworks/Python.framework/Versions/2.7.12' does not exist: you must install Python 2.7.12
BUT I'm certain I did install python 2.7.12, contrary to this error message. I tried reinstalling as a sanity check and confirmed that it IS installed:
brew install python
Warning: python-2.7.12 already installed
I've been wrestling with this for a few days now and it's really got me confused. My thought is that Anaconda might be causing a problem but I'm not sure. Any thoughts?
Edit: I've attempted to install pyenv per your suggestions and encounter the following error. Again, it looks like Anaconda is causing some conflict.
~ ➤ pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/tmpmwcdf4cipip-wheel- --python-tag cp35:
running bdist_wheel
running build
installing to build/bdist.macosx-10.5-x86_64/wheel
running install
Cloning into '/Users/johnlewis/.pyenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-doctor'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-installer'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-update'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-virtualenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
b''
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "//anaconda/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "//anaconda/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "//anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 232, in run
self.distinfo_dir)
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 364, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build/bdist.macosx-10.5-x86_64/wheel/pyenv-20150113.1-py3.5.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "//anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/
~ ➤