I receive the following error when trying to install pyPDF2 using following text at the command prompt:
python -m pip install pyPDF2
Any suggestions to resolve?
Error result:
Microsoft Windows [Version 10.0.19042.572]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\bell_>python -m pip install pyPDF2
Collecting pyPDF2
Using cached https://files.pythonhosted.org/packages/b4/01/68fcc0d43daf4c6bdbc6b33cc3f77bda531c86b174cac56ef0ffdb96faab/PyPDF2-1.26.0.tar.gz
Installing collected packages: pyPDF2
Running setup.py install for pyPDF2 ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bell_\\AppData\\Local\\Temp\\pip-install-q3y1fs2o\\pyPDF2\\setup.py'"'"'; __file__='"'"'C:\\Users\\bell_\\AppData\\Local\\Temp\\pip-install-q3y1fs2o\\pyPDF2\\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\bell_\AppData\Local\Temp\pip-record-4uxjshye\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\bell_\AppData\Local\Temp\pip-install-q3y1fs2o\pyPDF2\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\PyPDF2
copying PyPDF2\filters.py -> build\lib\PyPDF2
copying PyPDF2\generic.py -> build\lib\PyPDF2
copying PyPDF2\merger.py -> build\lib\PyPDF2
copying PyPDF2\pagerange.py -> build\lib\PyPDF2
copying PyPDF2\pdf.py -> build\lib\PyPDF2
copying PyPDF2\utils.py -> build\lib\PyPDF2
copying PyPDF2\xmp.py -> build\lib\PyPDF2
copying PyPDF2\_version.py -> build\lib\PyPDF2
copying PyPDF2\__init__.py -> build\lib\PyPDF2
running install_lib
creating C:\Program Files\Python38\Lib\site-packages\PyPDF2
error: could not create 'C:\Program Files\Python38\Lib\site-packages\PyPDF2': Access is denied
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bell_\\AppData\\Local\\Temp\\pip-install-q3y1fs2o\\pyPDF2\\setup.py'"'"'; __file__='"'"'C:\\Users\\bell_\\AppData\\Local\\Temp\\pip-install-q3y1fs2o\\pyPDF2\\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\bell_\AppData\Local\Temp\pip-record-4uxjshye\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
In your error it says that access was denied. So try running the same command while running cmd as admin.
Related
This question already has answers here:
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Error while installing lxml through pip: Microsoft Visual C++ 14.0 is required
(8 answers)
Pip error even Microsoft Visual C++ 14.0 is installed
(4 answers)
How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?
(9 answers)
Closed last year.
I am trying to install mod_wsgi so I can run my Django app with Apache.
However when I use pip install mod_wsgi I get the following error:
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-_w59fztq\\mod-wsgi_5a0ae0135da94aadbb09b85297022451\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-_w59fztq\\mod-wsgi_5a0ae0135da94aadbb09b85297022451\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-mwvtbeia\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Admin\AppData\Roaming\Python\Python310\Include\mod-wsgi'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-_w59fztq\mod-wsgi_5a0ae0135da94aadbb09b85297022451\
Complete output (24 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi
creating build\lib.win-amd64-3.10\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.10\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.10\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi\server
creating build\lib.win-amd64-3.10\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi\server\management
creating build\lib.win-amd64-3.10\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.10\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.10\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi\docs
creating build\lib.win-amd64-3.10\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.10\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.10\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' 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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-_w59fztq\\mod-wsgi_5a0ae0135da94aadbb09b85297022451\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-_w59fztq\\mod-wsgi_5a0ae0135da94aadbb09b85297022451\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-mwvtbeia\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Admin\AppData\Roaming\Python\Python310\Include\mod-wsgi' Check the logs for full command output.
I have no idea what the issue here could be..
I am trying to install TA-Lib and everything I try does not work. I do not know what package wheel is and why the error references numpy but I am hoping someone can help me.
What I am using:
Python 3.9.2
pip 21.1.1
PS C:\Users\ebben> pip install TA-Lib
Collecting TA-Lib
Using cached TA-Lib-0.4.19.tar.gz (267 kB)
Requirement already satisfied: numpy in c:\python39\lib\site-packages (from TA-Lib) (1.20.2)
Using legacy 'setup.py install' for TA-Lib, since package 'wheel' is not installed.
Installing collected packages: TA-Lib
Running setup.py install for TA-Lib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"'; __file__='"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib'
cwd: C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\
Complete output (20 lines):
C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\talib
copying talib\abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\deprecated.py -> build\lib.win-amd64-3.9\talib
copying talib\stream.py -> build\lib.win-amd64-3.9\talib
copying talib\test_abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\test_data.py -> build\lib.win-amd64-3.9\talib
copying talib\test_func.py -> build\lib.win-amd64-3.9\talib
copying talib\test_pandas.py -> build\lib.win-amd64-3.9\talib
copying talib\test_stream.py -> build\lib.win-amd64-3.9\talib
copying talib\__init__.py -> build\lib.win-amd64-3.9\talib
running build_ext
building 'talib._ta_lib' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"'; __file__='"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib' Check the logs for full command output.
TA-Lib is a C-library. You're trying to install a python wrapper for it and it can't find C library during installation. Wrapper prints:
setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
So, firstly, install the C library binary, then install python wrapper. Check out Dependencies section at https://mrjbq7.github.io/ta-lib/install.html
pip install open_excel
Collecting open_excel Using cached open_excel-0.101a0.tar.gz (6.5 kB) Requirement already satisfied: openpyxl in /usr/lib/python2.7/site-packages (from open_excel) (2.6.4) Requirement already satisfied: jdcal in /usr/lib/python2.7/site-packages (from openpyxl->open_excel) (1.4.1) Requirement already satisfied: et_xmlfile in /usr/lib/python2.7/site-packages (from openpyxl->open_excel) (1.0.1) Building wheels for collected packages: open-excel Building wheel for open-excel (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/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/pip-wheel-nyWtv9
cwd: /tmp/pip-install-UB5LPQ/open-excel/ Complete output (14 lines): /usr/lib/python2.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '0.101a' to '0.101a0'
normalized_version, running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/open_excel copying open_excel/__init__.py -> build/lib/open_excel copying open_excel/open_excel.py -> build/lib/open_excel copying open_excel/search_excel.py -> build/lib/open_excel running build_scripts creating build/scripts-2.7 error: open_excel: Is a directory
---------------------------------------- ERROR: Failed building wheel for open-excel Running setup.py clean for open-excel Failed to build open-excel Installing collected packages: open-excel
Running setup.py install for open-excel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/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-record-nTesj4/install-record.txt
--single-version-externally-managed --compile --install-headers /usr/include/python2.7/open-excel
cwd: /tmp/pip-install-UB5LPQ/open-excel/
Complete output (14 lines):
/usr/lib/python2.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '0.101a' to '0.101a0'
normalized_version,
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/open_excel
copying open_excel/__init__.py -> build/lib/open_excel
copying open_excel/open_excel.py -> build/lib/open_excel
copying open_excel/search_excel.py -> build/lib/open_excel
running build_scripts
creating build/scripts-2.7
error: open_excel: Is a directory
---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UB5LPQ/open-excel/setup.py'"'"';
__file__='"'"'/tmp/pip-install-UB5LPQ/open-excel/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-record-nTesj4/install-record.txt
--single-version-externally-managed --compile --install-headers /usr/include/python2.7/open-excel Check the logs for full command output.
That install seems to be buggy. It uses openpyxl, so you'll want to update yours from (2.6.4) to (3.0.5)
https://openpyxl.readthedocs.io/en/stable
Pick whichever one works for your OS:
pip install -U openpyxl
pip3 install -U openpyxl
python -m pip install -U openpyxl
python3 -m pip install -U openpyxl
py -m pip install -U openpyxl
py -3 -m pip install -U openpyxl
Save his scripts into the dir you are using, or a directory in your PATH, then import them as usual.
https://raw.githubusercontent.com/mohameosam/open_excel/master/open_excel.py
https://raw.githubusercontent.com/mohameosam/open_excel/master/search_excel.py
You can also submit a bug-report on GitHub, to let him know
https://github.com/mohameosam/open_excel/issues
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rkapr\\AppData\\Local\\Temp\\pip-install-9iaimw1v\\pycryptodome\\setup.py'"'"'; __file__='"'"'C:\\Users
\\rkapr\\AppData\\Local\\Temp\\pip-install-9iaimw1v\\pycryptodome\\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\rkapr\AppData\Local\Temp\pip-record-0trba1yq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pycrypt
odome'
cwd: C:\Users\rkapr\AppData\Local\Temp\pip-install-9iaimw1v\pycryptodome\
Complete output (364 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\Crypto
copying lib\Crypto\__init__.py -> build\lib.win32-3.8\Crypto
creating build\lib.win32-3.8\Crypto\Cipher
copying lib\Crypto\Cipher\AES.py -> build\lib.win32-3.8\Crypto\Cipher
copying lib\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS\SigGenPSS_186-2.txt -> build\lib.win32-3.8\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS
copying lib\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS\SigGenPSS_186-3.txt -> build\lib.win32-3.8\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS
copying lib\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS\SigVerPSS_186-3.rsp -> build\lib.win32-3.8\Crypto\SelfTest\Signature\test_vectors\PKCS1-PSS
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rkapr\\AppData\\Local\\Temp\\pip-install-9iaimw1v\\pycryptodome\\setup
.py'"'"'; __file__='"'"'C:\\Users\\rkapr\\AppData\\Local\\Temp\\pip-install-9iaimw1v\\pycryptodome\\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\rkapr\AppData\Local\Temp\pip-record-0trba1yq\install-record.txt' --single-version-externally-managed --compile --install-hea
ders 'c:\python38\Include\pycryptodome' Check the logs for full command output.
Install pyrebase4 instead. It is a newer well maintained pyrebase library.
pip install pyrebase4
Upgrade Pip then install again
python -m pip install --upgrade pip
pip install pyrebase.
Solved my Problem
Try to install pycryptodome separately using this command.
Make sure to run the terminal as administrator.
pip install pycryptodome
Having errors on cmd as admin trying to install new modules even re-installed python to get newest version, and keeps failing!
Modules I have tried
pip install pyaudio
pip install smtplib
AND MANY Others
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\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\marcu\AppData\Local\Temp\pip-record-dwdolxb5\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\marcu\AppData\Local\Temp\pip-install-9lkkindd\pyaudio\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\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\marcu\AppData\Local\Temp\pip-record-dwdolxb5\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
yes you must download visual c++ 14 on microsoft website(optionnal) before! try after install
update your pip also!
try this link https://www.techspot.com/downloads/6776-visual-c-redistributable-package.html