(Aug-03-2021, 12:37 PM)ndc85430 Wrote: [ -> ]1. You need to replace "[...some dir with a few GB of space...]
" with an actual directory. Think! You might not know what the commands do, but the text should prompt some thinking.
2. Why are you trying to use sudo
when the instructions for Windows explicitly do not?
You're right I just copy this code without prettying attention.
So i specified to install the C library on the disk c of my computer. I think the installation successed because I have now a repertory in my computer named libpostal.
But I still have an error when I try to install the library python postal :
pip install postal
Error message :
Error:
ERROR: Command errored out with exit status 1:
command: 'c:\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\setup.py'"'"'; __file__='"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\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\john\AppData\Local\Temp\pip-record-mp4adlfi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python38\Include\postal'
cwd: C:\Users\john\AppData\Local\Temp\pip-install-0g88jmxb\postal_d7ac59296f7a439eaf25b4ec38237aa4\
Complete output (36 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\postal
copying postal\dedupe.py -> build\lib.win-amd64-3.8\postal
copying postal\expand.py -> build\lib.win-amd64-3.8\postal
copying postal\near_dupe.py -> build\lib.win-amd64-3.8\postal
copying postal\normalize.py -> build\lib.win-amd64-3.8\postal
copying postal\parser.py -> build\lib.win-amd64-3.8\postal
copying postal\tokenize.py -> build\lib.win-amd64-3.8\postal
copying postal\token_types.py -> build\lib.win-amd64-3.8\postal
copying postal\__init__.py -> build\lib.win-amd64-3.8\postal
creating build\lib.win-amd64-3.8\postal\tests
copying postal\tests\test_expand.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\test_parser.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\_test_near_dupes.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\__init__.py -> build\lib.win-amd64-3.8\postal\tests
creating build\lib.win-amd64-3.8\postal\utils
copying postal\utils\encoding.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\enum.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\omitted.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\__init__.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\pyutils.h -> build\lib.win-amd64-3.8\postal
running build_ext
building 'postal._expand' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\postal
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/local/include -Ic:\python\python38\include -Ic:\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcpostal/pyexpand.c /Fobuild\temp.win-amd64-3.8\Release\postal/pyexpand.obj -std=c99
clÿ: warning D9002ÿ: option '-std=c99' inconnue ignor‚e
pyexpand.c
postal/pyexpand.c(2): fatal error C1083: 'libpostal/libpostal.h'ÿ: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\setup.py'"'"'; __file__='"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\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\john\AppData\Local\Temp\pip-record-mp4adlfi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python38\Include\postal' Check the logs for full command output.
Maybe I need to move the library libpostal's directory in python's directory ?
I'm sorry for my lack of knowledge, It the first time I use a library which need lot of configuration before using the command pip install.
It would be so easy if I could just write this command " pip install " and all things work by itself.
Thank you !
I'm not sure and I'm not using Windows so I can't even try to reproduce the issue for you. All I can suggest is to try and contact the developers of this library for help.
(Aug-04-2021, 07:13 AM)ndc85430 Wrote: [ -> ]I'm not sure and I'm not using Windows so I can't even try to reproduce the issue for you. All I can suggest is to try and contact the developers of this library for help.
Thank you so much for you're help and you're patient. I am going to find a way to contact them quickly.
Good luck. It does seem that the Python library is not well maintained, since there haven't been any commits for almost a year. It might be worth also exploring whether there are alternatives, too.
Err, the README you linked to does say to pip install
after installing the C library.
My mistake, sorry it happens.
hello,
(Aug-03-2021, 01:37 PM)Underground Wrote: [ -> ] (Aug-03-2021, 12:37 PM)ndc85430 Wrote: [ -> ]1. You need to replace "[...some dir with a few GB of space...]
" with an actual directory. Think! You might not know what the commands do, but the text should prompt some thinking.
2. Why are you trying to use sudo
when the instructions for Windows explicitly do not?
You're right I just copy this code without prettying attention.
So i specified to install the C library on the disk c of my computer. I think the installation successed because I have now a repertory in my computer named libpostal.
But I still have an error when I try to install the library python postal :
pip install postal
Error message :
Error:
ERROR: Command errored out with exit status 1:
command: 'c:\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\setup.py'"'"'; __file__='"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\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\john\AppData\Local\Temp\pip-record-mp4adlfi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python38\Include\postal'
cwd: C:\Users\john\AppData\Local\Temp\pip-install-0g88jmxb\postal_d7ac59296f7a439eaf25b4ec38237aa4\
Complete output (36 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\postal
copying postal\dedupe.py -> build\lib.win-amd64-3.8\postal
copying postal\expand.py -> build\lib.win-amd64-3.8\postal
copying postal\near_dupe.py -> build\lib.win-amd64-3.8\postal
copying postal\normalize.py -> build\lib.win-amd64-3.8\postal
copying postal\parser.py -> build\lib.win-amd64-3.8\postal
copying postal\tokenize.py -> build\lib.win-amd64-3.8\postal
copying postal\token_types.py -> build\lib.win-amd64-3.8\postal
copying postal\__init__.py -> build\lib.win-amd64-3.8\postal
creating build\lib.win-amd64-3.8\postal\tests
copying postal\tests\test_expand.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\test_parser.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\_test_near_dupes.py -> build\lib.win-amd64-3.8\postal\tests
copying postal\tests\__init__.py -> build\lib.win-amd64-3.8\postal\tests
creating build\lib.win-amd64-3.8\postal\utils
copying postal\utils\encoding.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\enum.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\omitted.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\utils\__init__.py -> build\lib.win-amd64-3.8\postal\utils
copying postal\pyutils.h -> build\lib.win-amd64-3.8\postal
running build_ext
building 'postal._expand' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\postal
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/local/include -Ic:\python\python38\include -Ic:\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcpostal/pyexpand.c /Fobuild\temp.win-amd64-3.8\Release\postal/pyexpand.obj -std=c99
clÿ: warning D9002ÿ: option '-std=c99' inconnue ignor‚e
pyexpand.c
postal/pyexpand.c(2): fatal error C1083: 'libpostal/libpostal.h'ÿ: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\setup.py'"'"'; __file__='"'"'C:\\Users\\john\\AppData\\Local\\Temp\\pip-install-0g88jmxb\\postal_d7ac59296f7a439eaf25b4ec38237aa4\\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\john\AppData\Local\Temp\pip-record-mp4adlfi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python38\Include\postal' Check the logs for full command output.
Maybe I need to move the library libpostal's directory in python's directory ?
I'm sorry for my lack of knowledge, It the first time I use a library which need lot of configuration before using the command pip install.
It would be so easy if I could just write this command " pip install " and all things work by itself.
Thank you !
you can try to put
libpostal.h in the folder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\libpostal
In attachment a wheel for python 3.8 , 3.9 windows x64
you have a procedure to install the library libpostal under windows
here
Friendly, J.P