I tried to install the Manimlib from the Pycharm's available packages, all the others components are installed, MikTex, Sox, and so on. But i have tried to install pycairo from Pycharm's packages and the pip installation, the following situation comes up:
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Collecting pydub
Using cached pydub-0.24.1-py2.py3-none-any.whl (30 kB)
Collecting pygments
Using cached Pygments-2.6.1-py3-none-any.whl (914 kB)
Collecting pyreadline
Using cached pyreadline-2.1.zip (109 kB)
Using legacy setup.py install for manimlib, since package 'wheel' is not installed.
Using legacy setup.py install for pycairo, since package 'wheel' is not installed.
Using legacy setup.py install for pyreadline, since package 'wheel' is not installed.
Installing collected packages: pycairo, pydub, pygments, pyreadline, manimlib
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CLIENTE\\AppData\\Local\\Temp\\pycharm-packaging\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\CLIENTE\\AppData\\Local\\Temp\\pycharm-packaging\\pycairo\\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\CLIENTE\AppData\Local\Temp\pip-record-4dwk2myc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\Include\pycairo'
cwd: C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\cairo
copying cairo\__init__.py -> build\lib.win-amd64-3.8\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-3.8\cairo
copying cairo\py.typed -> build\lib.win-amd64-3.8\cairo
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -IC:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\include -IC:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win-amd64-3.8\Release\cairo/device.obj
device.c
C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\cairo\pycairo.h(37): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'cairo.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\setup.py'"'"'; file='"'"'C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\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\CLIENTE\AppData\Local\Temp\pip-record-4dwk2myc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\Include\pycairo' Check the logs for full command output.
Before that i had installed the MS Visual Studio (2019 and C++ archives) as a requerement to pycairo. How can i fix this problem? (I also tried https://www.lfd.uci.edu/~gohlke/pythonlibs/ with the same problem.)
When I first tried downloading Manim, I ran into pycairo not working as well. What fixed this was making sure that I downloaded pycairo meant for Python version 3.7 (Manim currently does not support Python version 3.8), not the latest version which is for Python version 3.8.
(I can't help with the installation through Pycharm, since I don't use it, but...)
On this website: https://www.lfd.uci.edu/~gohlke/pythonlibs/ try downloading pycairo‑1.19.1‑cp37‑cp37m‑win_amd64.whl
Notice how the file name has cp37 which means it's meant for Python Version 3.7. Hope this helps!
EDIT: Also make sure that you are using Python version 3.7
Related
In Python, I want to use the sparsesvd package. Following the installation instructions, I ran the following line:
pip install sparsesvd
Initially, this seems to work:
Collecting sparsesvd
Using cached https://files.pythonhosted.org/packages/65/d9/c2545987871e27cad5969799a1d45073321a2904ac4dcb18bc0f1fe16ecc/sparsesvd-0.2.2.tar.gz
Requirement already satisfied: scipy>=0.6.0 in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from sparsesvd) (1.4.1)
Requirement already satisfied: cython in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from sparsesvd) (0.29.14)
Requirement already satisfied: numpy>=1.13.3 in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from scipy>=0.6.0->sparsesvd) (1.19.1)
Building wheels for collected packages: sparsesvd
But then an error shows:
Building wheel for sparsesvd (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\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 'C:\Users\USER_NAME\AppData\Local\Temp\pip-wheel-57sqoa2_' --python-tag cp37
cwd: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\
Complete output (18 lines):
running bdist_wheel
running build
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
cythoning sparsesvd.pyx to sparsesvd.c
C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\sparsesvd.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: sparsesvd.pxd:7:31: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: sparsesvd.pxd:7:40: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
building 'sparsesvd' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\SVDLIBC
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj
sparsesvd.c
c:\users\USER_NAME\appdata\local\continuum\anaconda3\include\pyconfig.h(203): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj" failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for sparsesvd
Running setup.py clean for sparsesvd
Failed to build sparsesvd
Installing collected packages: sparsesvd
Running setup.py install for sparsesvd ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\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\USER_NAME\AppData\Local\Temp\pip-record-47i_nbhg\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\
Complete output (14 lines):
running install
running build
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
skipping 'sparsesvd.c' Cython extension (up-to-date)
building 'sparsesvd' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\SVDLIBC
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj
sparsesvd.c
c:\users\USER_NAME\appdata\local\continuum\anaconda3\include\pyconfig.h(203): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\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\USER_NAME\AppData\Local\Temp\pip-record-47i_nbhg\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
What can I do to install this package?
After I downloaded the Visual Studios build tools it worked for me
A python novice here. I am trying to use python nmap library. In order to install that I use following command that is failing with error shown below as well.
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64>pip install python-nmap
Collecting python-nmap
Using cached https://files.pythonhosted.org/packages/dc/f2/9e1a2953d4d824e183ac033e3d223055e40e695fa6db2cb3e94a864eaa84/python-nmap-0.6.1.tar.gz
Installing collected packages: python-nmap
Running setup.py install for python-nmap ... error
Complete output from command "c:\program files (x86)\microsoft visual studio\shared\python36_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\root\\AppData\\Local\\Temp\\pip-install-lsrfn3ac\\python-nmap\\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\root\AppData\Local\Temp\pip-record-t73k4f0r\install-record.txt --single-version-externally-managed --compile:
c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\nmap
copying nmap\nmap.py -> build\lib\nmap
copying nmap\test.py -> build\lib\nmap
copying nmap\test_nmap.py -> build\lib\nmap
copying nmap\__init__.py -> build\lib\nmap
running install_lib
creating c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\site-packages\nmap
error: could not create 'c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\site-packages\nmap': Access is denied
----------------------------------------
Command ""c:\program files (x86)\microsoft visual studio\shared\python36_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\root\\AppData\\Local\\Temp\\pip-install-lsrfn3ac\\python-nmap\\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\root\AppData\Local\Temp\pip-record-t73k4f0r\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\root\AppData\Local\Temp\pip-install-lsrfn3ac\python-nmap\
Any ideas what I am doing wrong here?
error: could not create 'c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\site-packages\nmap': Access is denied
This says a new file is not being created so its clearly a owner permissions.just run the terminal as administrator or root and also verify which version of python interpreter loads when typing python in terminal else just use the pip3 instead of pip as this gets the python3 package.
(venv) C:\Users\Jaymoh\PycharmProjects\Elisanta>pip install PyAudio
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
Complete output from command C:\Users\Jaymoh\PycharmProjects\Elisanta\venv\Scripts\python.exe -u -c
"import setuptools,
tokenize;file='C:\Users\Jaymoh\AppData\Local\Temp
\pip-install-sp8mdmpo\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\Jaymoh\AppData\Local\Temp\pip-record-jxykmy44\install-record.txt
--single-version-externally-managed --compile --install-headers C:\Users\Jaymoh\PycharmProjects\Elisa
nta\venv\include\site\python3.7\PyAudio:
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
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Jaymoh\PycharmProje
cts\Elisanta\venv\include
-IC:\Users\Jaymoh\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\Jaymoh\AppData\Local\Programs\Python\Python37-32\include "-IC:\Program Files (x86)\Microsoft Visual
Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include"
"-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um"
/Tcsrc/_portaudiomodule.c /Fobuild\
temp.win32-3.7\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(27): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe'
failed with exit status 2
---------------------------------------- Command "C:\Users\Jaymoh\PycharmProjects\Elisanta\venv\Scripts\python.exe -u
-c "import setuptools, tokenize;file='C:\Users\Jaymoh\AppData\Local\Temp\pip-install-sp8mdmpo\
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\Jaymoh\A ppData\Local\Temp\pip-record-jxykmy44\install-record.txt
--single-version-externally-managed --compile --install-headers C:\Users\Jaymoh\PycharmProjects\Elisanta\venv\include\site\py
thon3.7\PyAudio" failed with error code 1 in
C:\Users\Jaymoh\AppData\Local\Temp\pip-install-sp8mdmpo\PyAudio\
Simply install pipwin
by pip install pipwin
and the run
pipwin install pyaudio
Download windows 10 sdk from vs buildtools and this should help you.
Download Link:https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
click on free download
pip install py3exiv2
Whenever i try to install "py3exiv2" module, some error messages appear :
Collecting py3exiv2
Downloading https://files.pythonhosted.org/packages/b3/56/52cc6757f24d828e9db35e8f24091ac1529471dd8c16b532925f4d89f0ca/py3exiv2-0.3.0.tar.gz
Installing collected packages: py3exiv2
Running setup.py install for py3exiv2 ... error
Complete output from command c:\users\nagasia.desktop-4proa3l\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\NAGASI~1.DES\\AppData\\Local\\Temp\\pip-install-sgx1rihl\\py3exiv2\\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\NAGASI~1.DES\AppData\Local\Temp\pip-record-isqztm52\install-record.txt --single-version-externally-managed --compile:
FIND: modificador no v lido
FIND: modificador no v lido
FIND: modificador no v lido
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\exif.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\iptc.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\metadata.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\preview.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\utils.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\xmp.py -> build\lib.win32-3.6\pyexiv2
copying src\pyexiv2\__init__.py -> build\lib.win32-3.6\pyexiv2
running build_ext
building 'libexiv2python' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\nagasia.desktop-4proa3l\appdata\local\programs\python\python36-32\include -Ic:\users\nagasia.desktop-4proa3l\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpsrc/exiv2wrapper.cpp /Fobuild\temp.win32-3.6\Release\src/exiv2wrapper.obj -g
cl : Command line warning D9002 : ignoring unknown option '-g'
exiv2wrapper.cpp
c:\users\nagasia.desktop-4proa3l\appdata\local\temp\pip-install-sgx1rihl\py3exiv2\src\exiv2wrapper.hpp(32): fatal error C1083: Cannot open include file: 'exiv2/image.hpp': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\nagasia.desktop-4proa3l\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\NAGASI~1.DES\\AppData\\Local\\Temp\\pip-install-sgx1rihl\\py3exiv2\\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\NAGASI~1.DES\AppData\Local\Temp\pip-record-isqztm52\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\NAGASI~1.DES\AppData\Local\Temp\pip-install-sgx1rihl\py3exiv2\
Is there anything that I could do such that it would install normaly?
Thanks in advance.
You are trying to compile code using VisualC++, but the code is configured for a Linux environment and needs the Gnu compiler.
As it requires a lot of knowledge to adapt and reconfigure the code, I suggest you use a ready-to-run module for Windows 10, e. g. piexif.
I am trying to install glove-python package on python3.5 (x64) and I got errors as it is shown below.
Note that I have TDM-GCC-64, MinGW32, MinGW64 ,Cygwin, microsot visual c++ for python 2.7 , microsoft visual 2008 (x64) and microsoft visual c++ 2015 (x64) Redistributable installed on my windows 10 to try to solve the problem.
I tried many solutions like creating distutils.cfg file to build package using mingw32/cygwin/mingw64 but all my trials gave me different errors! so I deleted the distutils.cfg file at all , But also this gives me an error as it is shown below .
Note: the path written in the error is for microsoft visual c++ for python 2.7 (but I am using python35) so this may be the cause of the error ?
Also I feel that the error may be due to Cython not running . I installed Cython 0.25.2 using pip install .But when I run pycharm debugger it gives me a warning that debugger speedups using cython not found.Also I got errors (during my trials to install the package by different ways) when building "glove.glove_cython".
Here is the error :
C:\Users\ESCA>pip3 install glove-python
Collecting glove-python
Using cached glove_python-0.1.0.tar.gz
Requirement already satisfied: numpy in c:\users\esca\appdata\local\programs\python\python35\lib\site-packages (from glove-python)
Requirement already satisfied: scipy in c:\users\esca\appdata\local\programs\python\python35\lib\site-packages (from glove-python)
Building wheels for collected packages: glove-python
Running setup.py bdist_wheel for glove-python ... error
Complete output from command c:\users\esca\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ESCA\\AppData\\Local\\Temp\\pip-build-4tm726dc\\glove-python\\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 C:\Users\ESCA\AppData\Local\Temp\tmp0war2fdwpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\glove
copying glove\corpus.py -> build\lib.win-amd64-3.5\glove
copying glove\glove.py -> build\lib.win-amd64-3.5\glove
copying glove\__init__.py -> build\lib.win-amd64-3.5\glove
running build_ext
building 'glove.glove_cython' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\glove
C:\Users\ESCA\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\esca\appdata\local\programs\python\python35\include -Ic:\users\esca\appdata\local\programs\python\python35\include /Tcglove/glove_cython.c /Fobuild\temp.win-amd64-3.5\Release\glove/glove_cython.obj -fopenmp -ffast-math -march=native
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
glove_cython.c
c:\users\esca\appdata\local\programs\python\python35\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Users\\ESCA\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for glove-python
Running setup.py clean for glove-python
Complete output from command c:\users\esca\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ESCA\\AppData\\Local\\Temp\\pip-build-4tm726dc\\glove-python\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
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 --all not recognized
----------------------------------------
Failed cleaning build dir for glove-python
Failed to build glove-python
Installing collected packages: glove-python
Running setup.py install for glove-python ... error
Complete output from command c:\users\esca\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ESCA\\AppData\\Local\\Temp\\pip-build-4tm726dc\\glove-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 C:\Users\ESCA\AppData\Local\Temp\pip-gs05_i6s-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running build_ext
building 'glove.glove_cython' extension
C:\Users\ESCA\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\esca\appdata\local\programs\python\python35\include -Ic:\users\esca\appdata\local\programs\python\python35\include /Tcglove/glove_cython.c /Fobuild\temp.win-amd64-3.5\Release\glove/glove_cython.obj -fopenmp -ffast-math -march=native
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
glove_cython.c
c:\users\esca\appdata\local\programs\python\python35\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Users\\ESCA\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\esca\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ESCA\\AppData\\Local\\Temp\\pip-build-4tm726dc\\glove-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 C:\Users\ESCA\AppData\Local\Temp\pip-gs05_i6s-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ESCA\AppData\Local\Temp\pip-build-4tm726dc\glove-python\
Try out this setup.py instead when you're compiling, works on the default install directories in Windows x64 machines:
from Cython.Distutils import build_ext
import numpy as np
import os
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
module = 'mymodule'
ext_modules = [Extension(module, sources=[module + '.pyx'],
include_dirs=['C://Program Files (x86)//Windows Kits//10//Include//10.0.10240.0//ucrt','C://Program Files (x86)//Microsoft Visual Studio 14.0//VC//include','C://Program Files (x86)//Windows Kits//8.1//Include//shared'],
library_dirs=['C://Program Files (x86)//Windows Kits//8.1//bin//x64', 'C://Windows//System32', 'C://Program Files (x86)//Microsoft Visual Studio 14.0//VC//lib//amd64', 'C://Program Files (x86)//Windows Kits//8.1//Lib//winv6.3//um//x64', 'C://Program Files (x86)//Windows Kits//10//Lib//10.0.10240.0//ucrt//x64'],
extra_compile_args=['/Ot', '/favor:INTEL64', '/EHsc', '/GA', '/openmp'],
language='c++')]
setup(
name = module,
ext_modules = ext_modules,
cmdclass = {'build_ext': build_ext},
include_dirs = [np.get_include(), os.path.join(np.get_include(), 'numpy')]
)
Note the above may need some serious editing for your paths to each include directory, as well as for the package you're installing. You're better off with Python 3.5 on Windows x64 to install Visual Studio 2015 Community then doing the python setup.py install from a VS command prompt that sets up all the include directories for you, either the VS2015 x64 native tools or MSBuild command prompt for VS2015 which appear after installing Community. Note that the VS2015 versions require Community at least to build Python modules as they got rid of the prior ability to compile via Microsoft redistributables.