python can't install, build pycrypto - python

When installing "pip3 install pycrypto" I have this error:
creating build/lib.linux-armv7l-3.6/Crypto/Protocol
copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
creating build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
creating build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
warning: PCTBuildPy: byte-compiling is disabled, skipping.
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/pip-build-71pdfh2i/pycrypto':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 456, in <module>
core.setup(**kw)
File "/core.py", line 148, in setup
File "/dist.py", line 955, in run_commands
File "/dist.py", line 974, in run_command
File "/opt/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/install.py", line 545, in run
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/build.py", line 135, in run
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 251, in run
self.run_command(cmd_name)
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 278, in run
raise RuntimeError("autoconf error")
RuntimeError: autoconf error
----------------------------------------
Command "/opt/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-71pdfh2i/pycrypto/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-cbi74gir-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-71pdfh2i/pycrypto/
My mount:
root#router2:~# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /opt type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /tmp/mnt/sda1 type ext4 (rw,relatime,data=ordered)
When using TMPDIR=/opt/tmp pip3 install pycrypto I also have problem (google showed that TMPDIR must be mounted without "noexec"):
creating build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
creating build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
copying lib/Crypto/Signature/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
warning: PCTBuildPy: byte-compiling is disabled, skipping.
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/opt/tmp/pip-build-ve5o0p9a/pycrypto':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 456, in <module>
core.setup(**kw)
File "/core.py", line 148, in setup
File "/dist.py", line 955, in run_commands
File "/dist.py", line 974, in run_command
File "/opt/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/install.py", line 545, in run
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/build.py", line 135, in run
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 251, in run
self.run_command(cmd_name)
File "/cmd.py", line 313, in run_command
File "/dist.py", line 974, in run_command
File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 278, in run
raise RuntimeError("autoconf error")
RuntimeError: autoconf error
----------------------------------------
Command "/opt/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /opt/tmp/pip-xa11ohvn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /opt/tmp/pip-build-ve5o0p9a/pycrypto/
gcc, autoconf, automake, python3-dev, python3-pip, python-crypto, python-cryptography were installed.
opkg install gcc, autoconf automake python3-dev, python3-pip, python-crypto, python-cryptography
I tried set HOME=/opt/tmp and TMPDIR=/opt/tmp
or HOME=/opt/tmp TMPDIR=/opt/tmp pip3 install pycrypto
but the problem is the same as above.
I read https://github.com/Entware-ng/Entware-ng/wiki/Self-installation-of-python-modules and follow it but wasn't successful.
pycrypto is requirement xiaomi component of hass
Please note that this is for python 3 not python 2.
Platform:
Buffalo WZR-1750DHP
Firmware: DD-WRT v3.0-r33006 std (08/03/17)
Please advise how to fix this issue.
Thank you!

Related

Unable to install poppler library

I am trying to install poppler. Its a requirement for one of the projects: https://github.com/idea-fasoc/datasheet-scrubber/tree/master/src/table_extraction
Every time I try in Anaconda Prompt, I get this error.
The conda command doesn't resolve the environment, hence I tried using pip
I installed cmake. I also installed it via VS installer.
This is the error I am still getting. Any help will be greatly appreciated!
(base) C:\Windows\System32>pip install python-poppler
Collecting python-poppler
Using cached python-poppler-0.3.0.tar.gz (823 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-poppler
Building wheel for python-poppler (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [103 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\poppler
copying src\poppler\destination.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\document.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\embeddedfile.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\font.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\image.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\page.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\pagerenderer.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\pagetransition.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\rectangle.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\toc.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\utilities.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\_version.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\__init__.py -> build\lib.win-amd64-cpython-39\poppler
creating build\lib.win-amd64-cpython-39\poppler\cpp
copying src\poppler\cpp\__init__.py -> build\lib.win-amd64-cpython-39\poppler\cpp
running egg_info
writing src\python_poppler.egg-info\PKG-INFO
writing dependency_links to src\python_poppler.egg-info\dependency_links.txt
writing top-level names to src\python_poppler.egg-info\top_level.txt
reading manifest file 'src\python_poppler.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'src\python_poppler.egg-info\SOURCES.txt'
running build_ext
C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py:32: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
cmake_version = LooseVersion(
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.34.31942.0
-- The CXX compiler identification is MSVC 19.34.31942.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- pybind11 v2.9.2
-- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found version "3.9.13")
-- Found PythonLibs: C:/ProgramData/Anaconda3/libs/python39.lib
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
CMake Error at C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
CMakeLists.txt:13 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/halda/AppData/Local/Temp/pip-install-onyki_zr/python-poppler_a0472eeab1dd487f8486d308273da89b/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 76, in <module>
setup(
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\build.py", line 24, in run
super().run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 39, in run
self.build_extension(ext)
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 68, in build_extension
subprocess.check_call(
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b\\build\\lib.win-amd64-cpython-39\\poppler\\cpp', '-DPYTHON_EXECUTABLE=C:\\ProgramData\\Anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b\\build\\lib.win-amd64-cpython-39\\poppler\\cpp', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-poppler
Running setup.py clean for python-poppler
Failed to build python-poppler
Installing collected packages: python-poppler
Running setup.py install for python-poppler ... error
error: subprocess-exited-with-error
× Running setup.py install for python-poppler did not run successfully.
│ exit code: 1
╰─> [107 lines of output]
running install
C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\poppler
copying src\poppler\destination.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\document.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\embeddedfile.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\font.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\image.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\page.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\pagerenderer.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\pagetransition.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\rectangle.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\toc.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\utilities.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\_version.py -> build\lib.win-amd64-cpython-39\poppler
copying src\poppler\__init__.py -> build\lib.win-amd64-cpython-39\poppler
creating build\lib.win-amd64-cpython-39\poppler\cpp
copying src\poppler\cpp\__init__.py -> build\lib.win-amd64-cpython-39\poppler\cpp
running egg_info
writing src\python_poppler.egg-info\PKG-INFO
writing dependency_links to src\python_poppler.egg-info\dependency_links.txt
writing top-level names to src\python_poppler.egg-info\top_level.txt
reading manifest file 'src\python_poppler.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'src\python_poppler.egg-info\SOURCES.txt'
running build_ext
C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py:32: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
cmake_version = LooseVersion(
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.34.31942.0
-- The CXX compiler identification is MSVC 19.34.31942.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- pybind11 v2.9.2
-- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found version "3.9.13")
-- Found PythonLibs: C:/ProgramData/Anaconda3/libs/python39.lib
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
CMake Error at C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/ProgramData/Anaconda3/Lib/site-packages/cmake/data/share/cmake-3.25/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
CMakeLists.txt:13 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/halda/AppData/Local/Temp/pip-install-onyki_zr/python-poppler_a0472eeab1dd487f8486d308273da89b/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 76, in <module>
setup(
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\command\install.py", line 692, in run
self.run_command('build')
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\build.py", line 24, in run
super().run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 39, in run
self.build_extension(ext)
File "C:\Users\halda\AppData\Local\Temp\pip-install-onyki_zr\python-poppler_a0472eeab1dd487f8486d308273da89b\setup.py", line 68, in build_extension
subprocess.check_call(
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b\\build\\lib.win-amd64-cpython-39\\poppler\\cpp', '-DPYTHON_EXECUTABLE=C:\\ProgramData\\Anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\halda\\AppData\\Local\\Temp\\pip-install-onyki_zr\\python-poppler_a0472eeab1dd487f8486d308273da89b\\build\\lib.win-amd64-cpython-39\\poppler\\cpp', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-poppler
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Edit: Updating the error I get even after installing the cmake
like the line
RuntimeError: CMake must be installed to build the following extensions: poppler.cpp.modules
says I would try to install cmake and then run it again
you can install it via
pip install cmake

Issues in installing pygobject in MacOS

I am trying to install pygobject using pip, even with brew in MacOS, but now successful. I followed guides.
If I use the official installation guide in https://pygobject.readthedocs.io/en/latest/getting_started.html, then I have gtk+3 installed, but when I try to import the library:
python3 -c 'import gi; gi.require_version("Gtk", "3.0"); print("ok")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
This is the output of the installation after using pip3:
(base) khalil presentation (master) >> pip3 install gobject pygobject
Collecting gobject
Downloading gobject-0.1.0-py3-none-any.whl (5.9 kB)
Collecting pygobject
Using cached PyGObject-3.42.1.tar.gz (718 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pycairo>=1.16.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pygobject) (1.20.1)
Building wheels for collected packages: pygobject
Building wheel for pygobject (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/tmpsnfmi_oc
cwd: /private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-install-2saq002f/pygobject_1efb85aba31e4700a39a2c6c52381a62
Complete output (90 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.6/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.macosx-10.9-x86_64-3.6/pygtkcompat
creating build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_signalhelper.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_constants.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_ossighelper.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/importer.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_error.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_gtktemplate.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_propertyhelper.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/types.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/docstring.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/_option.py -> build/lib.macosx-10.9-x86_64-3.6/gi
copying gi/module.py -> build/lib.macosx-10.9-x86_64-3.6/gi
creating build/lib.macosx-10.9-x86_64-3.6/gi/repository
copying gi/repository/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/gi/repository
creating build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/Pango.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/GLib.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/GObject.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/Gio.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.macosx-10.9-x86_64-3.6/gi/overrides
running build_ext
pycairo: new API
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 262, in build_wheel
metadata_directory)
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 231, in build_wheel
wheel_directory, config_settings)
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 268, in run_setup
self).run_setup(setup_script=setup_script)
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 1259, in <module>
main()
File "setup.py", line 1254, in main
zip_safe=False,
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 1088, in run
self._setup_extensions()
File "setup.py", line 1083, in _setup_extensions
add_pycairo(gi_cairo_ext)
File "setup.py", line 1066, in add_pycairo
ext.include_dirs += [get_pycairo_include_dir()]
File "setup.py", line 893, in get_pycairo_include_dir
include_dir = find_path(find_new_api())
File "setup.py", line 848, in find_new_api
import cairo
File "/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: dlopen(/private/var/folders/t0/_kkpxc35687gknp4d99b9lbr0000gn/T/pip-build-env-8drx7d57/overlay/lib/python3.6/site-packages/cairo/_cairo.cpython-36m-darwin.so, 0x0002): symbol not found in flat namespace '_cairo_append_path'
----------------------------------------
ERROR: Failed building wheel for pygobject
Failed to build pygobject
ERROR: Could not build wheels for pygobject, which is required to install pyproject.toml-based projects
(base) khalil presentation (master) >> ```
Problem solved! Thanks to #rasjani
First, I upgraded to the latest version of python, then I create a new_env using conda:
conda create --name new_env python=3.9.12
conda activate new_env
conda install -c conda-forge pygobject
Solution from: Github

ModuleNotFoundError: No module named 'gi'. Can't get PyGObject installed

I've been trying to solve this issue for about a week or two now, still haven't found a solution. I'm on Arch Linux. Here's what I've tried so far:
installed python-gobject and gobject-introspection through pacman
installed pycairo through python
Tried installing PyGObject through python, but it's throwing an error
tried pip install PyGObject --no-use-pep517
pip install --upgrade wheel
Reset $PATH variable
I do have Anaconda installed, which has been mentioned in other forums with similar issues, but haven't figured out what the problem could be regarding conda.
The main problem is I can't get PyGObject installed.
Here's the output for the program I'm trying to run:
$ ./lutris
Traceback (most recent call last):
File "/home/greyside/git/lutris/bin/./lutris", line 52, in <module>
from lutris.gui.application import Application # pylint: disable=no-name-in-module
File "/home/greyside/git/lutris/lutris/gui/application.py", line 28, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
Here's the output for pip install PyGObject:
$ pip install PyGObject
Collecting PyGObject
Using cached PyGObject-3.42.0.tar.gz (716 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: pycairo>=1.16.0 in /home/greyside/anaconda3/lib/python3.9/site-packages (from PyGObject) (1.21.0)
Building wheels for collected packages: PyGObject
Building wheel for PyGObject (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/greyside/anaconda3/bin/python /home/greyside/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpn15zx71v
cwd: /tmp/pip-install-s12pfc6q/pygobject_15ec34742d654e599404ba75c60a660e
Complete output (98 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.9/pygtkcompat
creating build/lib.linux-x86_64-3.9/gi
copying gi/types.py -> build/lib.linux-x86_64-3.9/gi
copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.9/gi
copying gi/module.py -> build/lib.linux-x86_64-3.9/gi
copying gi/importer.py -> build/lib.linux-x86_64-3.9/gi
copying gi/docstring.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_option.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_error.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_constants.py -> build/lib.linux-x86_64-3.9/gi
copying gi/__init__.py -> build/lib.linux-x86_64-3.9/gi
creating build/lib.linux-x86_64-3.9/gi/repository
copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.9/gi/repository
creating build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.9/gi/overrides
running build_ext
pycairo: new API
Traceback (most recent call last):
File "/home/greyside/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
main()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/greyside/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 248, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 1259, in <module>
main()
File "setup.py", line 1219, in main
setup(
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 1088, in run
self._setup_extensions()
File "setup.py", line 1083, in _setup_extensions
add_pycairo(gi_cairo_ext)
File "setup.py", line 1066, in add_pycairo
ext.include_dirs += [get_pycairo_include_dir()]
File "setup.py", line 893, in get_pycairo_include_dir
include_dir = find_path(find_new_api())
File "setup.py", line 848, in find_new_api
import cairo
File "/tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: /tmp/pip-build-env-4lzlmpry/overlay/lib/python3.9/site-packages/cairo/_cairo.cpython-39-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index
----------------------------------------
ERROR: Failed building wheel for PyGObject
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly
And here's the output for pip install PyGObject --no-use-pep517:
pip install PyGObject --no-use-pep517
Collecting PyGObject
Using cached PyGObject-3.42.0.tar.gz (716 kB)
Requirement already satisfied: pycairo>=1.16.0 in /home/greyside/anaconda3/lib/python3.9/site-packages (from PyGObject) (1.21.0)
Building wheels for collected packages: PyGObject
Building wheel for PyGObject (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/greyside/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-72srifkn
cwd: /tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/
Complete output (85 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.9/pygtkcompat
creating build/lib.linux-x86_64-3.9/gi
copying gi/types.py -> build/lib.linux-x86_64-3.9/gi
copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.9/gi
copying gi/module.py -> build/lib.linux-x86_64-3.9/gi
copying gi/importer.py -> build/lib.linux-x86_64-3.9/gi
copying gi/docstring.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_option.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_error.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_constants.py -> build/lib.linux-x86_64-3.9/gi
copying gi/__init__.py -> build/lib.linux-x86_64-3.9/gi
creating build/lib.linux-x86_64-3.9/gi/repository
copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.9/gi/repository
creating build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.9/gi/overrides
running build_ext
pycairo: new API
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1259, in <module>
main()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1219, in main
setup(
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1088, in run
self._setup_extensions()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1083, in _setup_extensions
add_pycairo(gi_cairo_ext)
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1066, in add_pycairo
ext.include_dirs += [get_pycairo_include_dir()]
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 893, in get_pycairo_include_dir
include_dir = find_path(find_new_api())
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 848, in find_new_api
import cairo
File "/home/greyside/anaconda3/lib/python3.9/site-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: /home/greyside/anaconda3/lib/python3.9/site-packages/cairo/_cairo.cpython-39-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index
----------------------------------------
ERROR: Failed building wheel for PyGObject
Running setup.py clean for PyGObject
Failed to build PyGObject
Installing collected packages: PyGObject
Running setup.py install for PyGObject ... error
ERROR: Command errored out with exit status 1:
command: /home/greyside/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/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 /tmp/pip-record-0v4b5sk8/install-record.txt --single-version-externally-managed --compile --install-headers /home/greyside/anaconda3/include/python3.9/PyGObject
cwd: /tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/
Complete output (89 lines):
running install
/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.9/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.9/pygtkcompat
creating build/lib.linux-x86_64-3.9/gi
copying gi/types.py -> build/lib.linux-x86_64-3.9/gi
copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.9/gi
copying gi/module.py -> build/lib.linux-x86_64-3.9/gi
copying gi/importer.py -> build/lib.linux-x86_64-3.9/gi
copying gi/docstring.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_option.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_error.py -> build/lib.linux-x86_64-3.9/gi
copying gi/_constants.py -> build/lib.linux-x86_64-3.9/gi
copying gi/__init__.py -> build/lib.linux-x86_64-3.9/gi
creating build/lib.linux-x86_64-3.9/gi/repository
copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.9/gi/repository
creating build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.9/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.9/gi/overrides
running build_ext
pycairo: new API
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1259, in <module>
main()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1219, in main
setup(
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 670, in run
self.run_command('build')
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/greyside/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1088, in run
self._setup_extensions()
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1083, in _setup_extensions
add_pycairo(gi_cairo_ext)
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 1066, in add_pycairo
ext.include_dirs += [get_pycairo_include_dir()]
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 893, in get_pycairo_include_dir
include_dir = find_path(find_new_api())
File "/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py", line 848, in find_new_api
import cairo
File "/home/greyside/anaconda3/lib/python3.9/site-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: /home/greyside/anaconda3/lib/python3.9/site-packages/cairo/_cairo.cpython-39-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index
----------------------------------------
ERROR: Command errored out with exit status 1: /home/greyside/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yujdqs8g/pygobject_33b98e7ae1f94d9ea4537c84d96133cb/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 /tmp/pip-record-0v4b5sk8/install-record.txt --single-version-externally-managed --compile --install-headers /home/greyside/anaconda3/include/python3.9/PyGObject Check the logs for full command output.

How do I fix this cx_Freeze ValueError?

I am trying to create proper program with python which can be executable on a friend's computer. To do this I am using cx_Freeze and following the steps outlined here How can I convert a .py to .exe for Python 3.6?
However when I type python setup.py build in the prompt it gives me the following error. I have googled this but am not sure how to go about fixing it. Thank you for any help in advance.
PS C:\Users\jhgwa> python setup.py build
running build
running build_exe
creating directory build\exe.win-amd64-3.6
copying C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\bases\Console.exe -> build\exe.win-amd64-3.6\Announcement Keyword From Headline Puller.exe
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-stdio-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-stdio-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\python36.dll -> build\exe.win-amd64-3.6\python36.dll
copying C:\Users\jhgwa\Anaconda3\VCRUNTIME140.dll -> build\exe.win-amd64-3.6\VCRUNTIME140.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-math-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-math-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-locale-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-locale-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-string-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-string-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-runtime-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-runtime-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-convert-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-convert-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-time-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-time-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-environment-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-environment-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-process-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-process-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-heap-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-heap-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-conio-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-conio-l1-1-0.dll
copying C:\Users\jhgwa\Anaconda3\api-ms-win-crt-filesystem-l1-1-0.dll -> build\exe.win-amd64-3.6\api-ms-win-crt-filesystem-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\win32\lib\win32verstamp.py", line 120, in stamp
bits = [int(i) for i in ver.split(".")]
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\win32\lib\win32verstamp.py", line 120, in <listcomp>
bits = [int(i) for i in ver.split(".")]
ValueError: invalid literal for int() with base 10: '<any number>'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 22, in <module>
executables = executables
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\dist.py", line 349, in setup
distutils.core.setup(**attrs)
File "C:\Users\jhgwa\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\jhgwa\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\jhgwa\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\jhgwa\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\jhgwa\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\jhgwa\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\dist.py", line 219, in run
freezer.Freeze()
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\freezer.py", line 617, in Freeze
self._FreezeExecutable(executable)
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\freezer.py", line 226, in _FreezeExecutable
self._AddVersionResource(exe)
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\cx_Freeze\freezer.py", line 167, in _AddVersionResource
stamp(fileName, versionInfo)
File "C:\Users\jhgwa\Anaconda3\lib\site-packages\win32\lib\win32verstamp.py", line 123, in stamp
raise ValueError("--version must be a.b.c.d (all integers) - got %r" % ver)
ValueError: --version must be a.b.c.d (all integers) - got '<any number>.0.0.0'
PS C:\Users\jhgwa>
In the setup.py file you have to set the value of version to a string, in this example code I just set it to "1.0":
setup(
name = '<app name>',
options = options,
version = "1.0",
description = '<any description>',
executables = executables
)
That should be enough.

ImportError: No module named numpy.distutils.core while installing XGBoost in Windows/Python

I am planning to install the XGBoost package in Python for Windows. After following the instructions mentioned here (How to install xgboost package in python (windows platform)?), I am facing issues during the last step (python setup.py install).
$ python setup.py install --user
Install libxgboost from: ['..\\lib\\xgboost.dll']
running install
running bdist_egg
running egg_info
writing requirements to xgboost.egg-info\requires.txt
writing xgboost.egg-info\PKG-INFO
writing top-level names to xgboost.egg-info\top_level.txt
writing dependency_links to xgboost.egg-info\dependency_links.txt
reading manifest file 'xgboost.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'xgboost\include'
warning: no files found matching '*' under directory 'xgboost\src'
warning: no files found matching '*' under directory 'xgboost\make'
warning: no files found matching '*' under directory 'xgboost\rabit'
warning: no files found matching '*' under directory 'xgboost\lib'
warning: no files found matching '*' under directory 'xgboost\dmlc-core'
warning: no previously-included files matching '*.o' found anywhere in distribut ion
warning: no previously-included files matching '*.a' found anywhere in distribut ion
warning: no previously-included files matching '*.pyo' found anywhere in distrib ution
warning: no previously-included files matching '*.pyc' found anywhere in distrib ution
writing manifest file 'xgboost.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\bdist.win32\egg
creating build\bdist.win32\egg\xgboost
copying build\lib\xgboost\build-python.sh -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\callback.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\compat.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\core.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\libpath.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\plotting.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\rabit.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\sklearn.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\training.py -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\VERSION -> build\bdist.win32\egg\xgboost
copying build\lib\xgboost\__init__.py -> build\bdist.win32\egg\xgboost
byte-compiling build\bdist.win32\egg\xgboost\callback.py to callback.pyc
byte-compiling build\bdist.win32\egg\xgboost\compat.py to compat.pyc
byte-compiling build\bdist.win32\egg\xgboost\core.py to core.pyc
byte-compiling build\bdist.win32\egg\xgboost\libpath.py to libpath.pyc
byte-compiling build\bdist.win32\egg\xgboost\plotting.py to plotting.pyc
byte-compiling build\bdist.win32\egg\xgboost\rabit.py to rabit.pyc
byte-compiling build\bdist.win32\egg\xgboost\sklearn.py to sklearn.pyc
byte-compiling build\bdist.win32\egg\xgboost\training.py to training.pyc
byte-compiling build\bdist.win32\egg\xgboost\__init__.py to __init__.pyc
installing package data to build\bdist.win32\egg
running install_data
copying ..\lib\xgboost.dll -> build\bdist.win32\egg\xgboost
creating build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying xgboost.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
creating 'dist\xgboost-0.6-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing xgboost-0.6-py2.7.egg
creating c:\users\mishraji\appdata\roaming\python\python27\site-packages\xgboost -0.6-py2.7.egg
Extracting xgboost-0.6-py2.7.egg to c:\users\mishraji\appdata\roaming\python\pyt hon27\site-packages
Adding xgboost 0.6 to easy-install.pth file
Installed c:\users\mishraji\appdata\roaming\python\python27\site-packages\xgboos t-0.6-py2.7.egg
Processing dependencies for xgboost==0.6
Searching for scipy
Reading https://pypi.python.org/simple/scipy/
Downloading https://pypi.python.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec1517 90622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz#md5=6b4d91b62f1926282b127194 a06b72b3
Best match: scipy 0.19.1
Processing scipy-0.19.1.tar.gz
Writing c:\users\mishraji\appdata\local\temp\easy_install-cxrtxb\scipy-0.19.1\se tup.cfg
Running scipy-0.19.1\setup.py -q bdist_egg --dist-dir c:\users\mishraji\appdata\ local\temp\easy_install-cxrtxb\scipy-0.19.1\egg-dist-tmp-hya72r
c:\users\mishraji\appdata\local\temp\easy_install-cxrtxb\scipy-0.19.1\setup.py:3 23: UserWarning: Unrecognized setuptools command, proceeding with generating Cyt hon sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
Traceback (most recent call last):
File "setup.py", line 42, in <module>
url='https://github.com/dmlc/xgboost')
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 67, i n run
self.do_egg_install()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 117, in do_egg_install
cmd.run()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 410, in run
self.easy_install(spec, not self.no_deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 646, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 697, in install_item
self.process_distribution(spec, dist, deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 742, in process_distribution
[requirement], self.local_index, self.easy_install
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 850, in r esolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1134, in obtain
return installer(requirement)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 251, in run_s etup
raise
File "C:\Python27\lib\contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 198, in setup _context
yield
File "C:\Python27\lib\contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 169, in save_ modules
saved_exc.resume()
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 144, in resum e
six.reraise(type, exc, self._tb)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 157, in save_ modules
yield saved
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 198, in setup _context
yield
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 248, in run_s etup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 278, in run
return func()
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 246, in runne r
_execfile(setup_script, ns)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 47, in _execf ile
exec(code, globals, locals)
File "c:\users\mishraji\appdata\local\temp\easy_install-cxrtxb\scipy-0.19.1\se tup.py", line 416, in <module>
File "c:\users\mishraji\appdata\local\temp\easy_install-cxrtxb\scipy-0.19.1\se tup.py", line 396, in setup_package
ImportError: No module named numpy.distutils.core
However, when I import the package in python, it works without any issue.
import numpy.distutils.core as np
The issue occured because I had two python versions (v 2.7.13) and Enthought Canopy (Python 2.7.11). As Python 2.7.11 already had Numpy package, xgboost got installed successfully.
python setup.py install
For me in a Docker, installing numpy first worked:
RUN pip install numpy==1.8.1
RUN pip install scikit-fmm==0.0.9

Categories

Resources