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.
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
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
I am trying to install postal package using
pip install postal
I am following the steps mentioned in link
https://github.com/openvenues/libpostal#installation-windows
I have installed Visual Studio 2019 C++ Build Tools, MSYS2 and performed the step
git clone https://github.com/openvenues/libpostal
cd libpostal
cp -rf windows/* ./
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]
make -j4
make install
Still I am not able to install postal package using pip install postal
Getting below logs while installing postal package.
(base) C:\Users\Praveen>pip install postal
Collecting postal
Using cached https://files.pythonhosted.org/packages/56/f7/69ca5d374077e23aa9a51ecd4031222ca9dfb7d19c95d7691f024e2e27ef/postal-1.1.8.tar.gz
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from postal) (1.12.0)
Building wheels for collected packages: postal
Building wheel for postal (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\setup.py'"'"'; __file__='"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\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\Praveen\AppData\Local\Temp\pip-wheel-e6vpt_0y' --python-tag cp37
cwd: C:\Users\Praveen\AppData\Local\Temp\pip-install-9sens8xe\postal\
Complete output (35 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\postal
copying postal\dedupe.py -> build\lib.win-amd64-3.7\postal
copying postal\expand.py -> build\lib.win-amd64-3.7\postal
copying postal\near_dupe.py -> build\lib.win-amd64-3.7\postal
copying postal\normalize.py -> build\lib.win-amd64-3.7\postal
copying postal\parser.py -> build\lib.win-amd64-3.7\postal
copying postal\tokenize.py -> build\lib.win-amd64-3.7\postal
copying postal\token_types.py -> build\lib.win-amd64-3.7\postal
copying postal\__init__.py -> build\lib.win-amd64-3.7\postal
creating build\lib.win-amd64-3.7\postal\tests
copying postal\tests\test_expand.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\test_parser.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\_test_near_dupes.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\__init__.py -> build\lib.win-amd64-3.7\postal\tests
creating build\lib.win-amd64-3.7\postal\utils
copying postal\utils\encoding.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\enum.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\omitted.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\__init__.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\pyutils.h -> build\lib.win-amd64-3.7\postal
running build_ext
building 'postal._expand' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\postal
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/local/include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpostal/pyexpand.c /Fobuild\temp.win-amd64-3.7\Release\postal/pyexpand.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
pyexpand.c
postal/pyexpand.c(2): fatal error C1083: Cannot open include file: 'libpostal/libpostal.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for postal
Running setup.py clean for postal
Failed to build postal
Installing collected packages: postal
Running setup.py install for postal ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\setup.py'"'"'; __file__='"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\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\Praveen\AppData\Local\Temp\pip-record-k92kr5uk\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Praveen\AppData\Local\Temp\pip-install-9sens8xe\postal\
Complete output (35 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\postal
copying postal\dedupe.py -> build\lib.win-amd64-3.7\postal
copying postal\expand.py -> build\lib.win-amd64-3.7\postal
copying postal\near_dupe.py -> build\lib.win-amd64-3.7\postal
copying postal\normalize.py -> build\lib.win-amd64-3.7\postal
copying postal\parser.py -> build\lib.win-amd64-3.7\postal
copying postal\tokenize.py -> build\lib.win-amd64-3.7\postal
copying postal\token_types.py -> build\lib.win-amd64-3.7\postal
copying postal\__init__.py -> build\lib.win-amd64-3.7\postal
creating build\lib.win-amd64-3.7\postal\tests
copying postal\tests\test_expand.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\test_parser.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\_test_near_dupes.py -> build\lib.win-amd64-3.7\postal\tests
copying postal\tests\__init__.py -> build\lib.win-amd64-3.7\postal\tests
creating build\lib.win-amd64-3.7\postal\utils
copying postal\utils\encoding.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\enum.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\omitted.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\utils\__init__.py -> build\lib.win-amd64-3.7\postal\utils
copying postal\pyutils.h -> build\lib.win-amd64-3.7\postal
running build_ext
building 'postal._expand' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\postal
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/local/include -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpostal/pyexpand.c /Fobuild\temp.win-amd64-3.7\Release\postal/pyexpand.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
pyexpand.c
postal/pyexpand.c(2): fatal error C1083: Cannot open include file: 'libpostal/libpostal.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\setup.py'"'"'; __file__='"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-9sens8xe\\postal\\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\Praveen\AppData\Local\Temp\pip-record-k92kr5uk\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Try the following solution. I am running this in WSL.
Changes
Navigate to cd~ directory before all commands.
Use 'sudo' before make.
cd~
git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure
sudo make
sudo make install
Then run
pip install postal
Also pip install nose prior to importing and running the postal library.
Most of the time, libpostal fails in windows python bindings, so I have got a new python package that bundled the libpostal and using the python package, it can be used.
Here is the package called pypostalwin
Follow the ReadMe instructions and enjoy using libpostal from python
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