when run "python setup.py install", I meet "error:[WinError 32] The process cannot access the file because it is being used by another process" - python-3.x

I want to install Third-party library "uncertainty-baselines" in my conda virtual environment "uncertainty_bl".I want to run "Batchensemble" example.
C:\Users\70987\Desktop\uncertainty-baselines-main>conda activate uncertainty_BL
(uncertainty_BL) C:\Users\70987\Desktop\uncertainty-baselines-main>python setup.py install
running install
E:\Anaconda\envs\uncertainty_BL\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(
E:\Anaconda\envs\uncertainty_BL\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing uncertainty_baselines.egg-info\PKG-INFO
writing dependency_links to uncertainty_baselines.egg-info\dependency_links.txt
writing requirements to uncertainty_baselines.egg-info\requires.txt
writing top-level names to uncertainty_baselines.egg-info\top_level.txt
reading manifest file 'uncertainty_baselines.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'uncertainty_baselines.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\uncertainty_baselines
creating build\bdist.win-amd64\egg\uncertainty_baselines\datasets
copying build\lib\uncertainty_baselines\datasets\aptos.py -> build\bdist.win-amd64\egg\uncertainty_baselines\datasets
...
byte-compiling build\bdist.win-amd64\egg\uncertainty_baselines\datasets\aptos.py to aptos.cpython-39.pyc
...
creating build\bdist.win-amd64\egg\EGG-INFO
copying uncertainty_baselines.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying uncertainty_baselines.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying uncertainty_baselines.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying uncertainty_baselines.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying uncertainty_baselines.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\uncertainty_baselines-0.0.7-py3.9.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing uncertainty_baselines-0.0.7-py3.9.egg
Removing e:\anaconda\envs\uncertainty_bl\lib\site-packages\uncertainty_baselines-0.0.7-py3.9.egg
error: [WinError 32] Another program is using this file and the process cannot access it。: 'e:\\anaconda\\envs\\uncertainty_bl\\lib\\site-packages\\uncertainty_baselines-0.0.7-py3.9.egg'
Why I meet the error? How to deal with it?

Related

how to install django-auth-ldap

so basicly i'm trying to install django-auth-ldap to my system, but it always crashes with errors
i use python3.10 on Ubuntu 20.04 with Django 4.0.4
(.venv) user#vmlist:~/test/vmlist_frontend$ pip3.10 install django-auth-ldap
Collecting django-auth-ldap
Using cached django_auth_ldap-4.1.0-py3-none-any.whl (20 kB)
Collecting python-ldap>=3.1
Using cached python-ldap-3.4.0.tar.gz (376 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Django>=2.2 in /home/user/test/.venv/lib/python3.10/site-packages (from django-auth-ldap) (4.0.4)
Requirement already satisfied: sqlparse>=0.2.2 in /home/user/test/.venv/lib/python3.10/site-packages (from Django>=2.2->django-auth-ldap) (0.4.2)
Requirement already satisfied: asgiref<4,>=3.4.1 in /home/user/test/.venv/lib/python3.10/site-packages (from Django>=2.2->django-auth-ldap) (3.5.2)
Collecting pyasn1-modules>=0.1.5
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Requirement already satisfied: pyasn1>=0.3.7 in /home/user/test/.venv/lib/python3.10/site-packages (from python-ldap>=3.1->django-auth-ldap) (0.4.8)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for python-ldap (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [101 lines of output]
/tmp/pip-build-env-kzs5bz2f/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
copying Lib/ldapurl.py -> build/lib.linux-x86_64-cpython-310
copying Lib/ldif.py -> build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-cpython-310/ldap
creating build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-cpython-310/ldap/controls
creating build/lib.linux-x86_64-cpython-310/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-cpython-310/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-cpython-310/ldap/extop
copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/extop
creating build/lib.linux-x86_64-cpython-310/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-cpython-310/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-cpython-310/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-cpython-310/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/schema
creating build/lib.linux-x86_64-cpython-310/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-cpython-310/slapdtest
copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-cpython-310/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'Doc/.build'
adding license file 'LICENCE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
/tmp/pip-build-env-kzs5bz2f/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning: !!
############################
# Package would be ignored #
############################
Python recognizes 'slapdtest.certs' as an importable package, however it is
included in the distribution as "data".
This behavior is likely to change in future versions of setuptools (and
therefore is considered deprecated).
Please make sure that 'slapdtest.certs' is included as a package by using
setuptools' `packages` configuration field or the proper discovery methods.
You can read more about "package discovery" and "data files" on setuptools
documentation page.
!!
check.warn(importable)
creating build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/Modules
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.4.0 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -I/home/user/test/.venv/include -I/usr/include/python3.10 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-310/Modules/LDAPObject.o
error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap
ERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects
i tried to install the prerequisits for ldap (They did install seccessfully), but it also did not help
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
how to solve the porblem? :(
fixed the porblem by installing this things:
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
sudo apt-get install build-essential python3-dev python3.10-dev python2.7-dev libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind

getting error while installing tronpy , tronweb , tronapi

i tried install tronpy but it shows legacy-install-failur
full error code below
sing legacy 'setup.py install' for trx-utils, since package 'wheel' is not installed.
Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
Installing collected packages: bitarray, cytoolz, attrdict, trx-utils, eth-utils, rlp, eth-keys, eth-abi, eth-rlp, eth-keyfile, eth-account, tronweb
Running setup.py install for bitarray ... error
error: subprocess-exited-with-error
× Running setup.py install for bitarray did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray\util.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray_init_.py -> build\lib.win-amd64-3.10\bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\bitarray
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /M
D -IC:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\Include -IC:\Pro
gram Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include /Tcbitarray/_bitarray.c /Fobuild\temp.win-amd64-3.10\Release\bitarray/_bitarray.obj
_bitarray.c
C:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
[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.
╰─> bitarray
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Until now, tronapi still does not support python 3.10 and above, so you should use python 3.9

Trying to install python-mbedtls on Windows using VSCode

I am trying to install the python-mbedtls package using pip installer in my venv on Windows, but I am getting the below error:
build\3.10.2\temp.win-amd64-3.10\Release\pyrex\mbedtls\exceptions.c(685): fatal error C1083: Cannot open include file: 'mbedtls/error.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-mbedtls
Failed to build python-mbedtls
ERROR: Could not build wheels for python-mbedtls, which is required to install pyproject.toml-based projects
I know that this library uses the C lib mbedtls and I have no experience using C, or C libraries in my python code directly.
I have made sure to install the C/C++ build tools on my VSCode, and I'm using Python 3.10. I am completely lost on how to proceed

Why is nixos-rebuild switch creating a store for something that is not used?

I did something to my system when switching channels from nixos-18.09 to nixos-unstable and back, and now run into an issue that prevents $ nixos-rebuild switch from running successfully.
When I try to do that, I get the following error:
writing manifest file 'singledispatch.egg-info/SOURCES.txt'
Copying singledispatch.egg-info to build/bdist.linux-x86_64/wheel/singledispatch-3.4.0.3-py3.6.egg-info
running install_scripts
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 20, in <module>
long_description = f.read()
File "/nix/store/qbyckcddc74s2fi060n8xqcn8gygrhjl-python3-3.6.8/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 898: ordinal not in range(128)
builder for '/nix/store/mcncvdwadrq1335bwy279dg7q0sxhvhp-python3.6-rsa-4.0.drv' failed with exit code 1
cannot build derivation '/nix/store/pifmbmqallj7jkl3ar1wv8nqyfzq08hr-python3.6-python-jose-3.0.1.drv': 1 dependencies couldn't be built
building '/nix/store/1qy7ka8c0s3mjv51pdiyyp103d11awkb-python3.6-termstyle-0.1.11.drv'...
building '/nix/store/8zvlx7367p21vj0iccsvhpz1jv3wx0b6-python3.6-websocket_client-0.54.0.drv'...
cannot build derivation '/nix/store/3w08jzilgvddzx728nnkpaadc7sd9p2v-python3.6-moto-1.3.7.drv': 1 dependencies couldn't be built
building '/nix/store/qfkfr913dx4ssp1qahfd9wcj6csf6yxm-python3.6-xlrd-1.1.0.drv'...
building '/nix/store/dvi6y2zlc4gwli0qqhxhr6cbvfs5qwhx-python3.6-xlwt-1.3.0.drv'...
building '/nix/store/p38p279r5y8bh7n9pvw8194k9zvnybic-reload-container.drv'...
cannot build derivation '/nix/store/sf4d3zrds99sq22s096f4pdwb2602mf2-python3.6-pandas-0.23.4.drv': 1 dependencies couldn't be built
building '/nix/store/hy1197qj5ivb54wicyn0ljdbv8qxp0zc-remove-references-to.drv'...
building '/nix/store/6cqp8vf151gvxbnz03qp4sj9awd8lnfc-smb-dummy.conf.drv'...
building '/nix/store/cb5r8y9llx4yw64kyg2hhwds4g123h29-stage-1-init.sh.drv'...
building '/nix/store/4ps1704mhdqj5bp1ck7sa2x67l7h08x4-su.pam.drv'...
cannot build derivation '/nix/store/hx05mqxryfl1aqvc5lqf0q05n230qnz3-system-path.drv': 1 dependencies couldn't be built
building '/nix/store/zrrbcfif92d7yz1d4vlcnva3gx8npc2k-systemd-boot-builder.py.drv'...
building '/nix/store/z8mld3scs2hzb6k3hffjqvfyrg9qnlg7-systemd-user.pam.drv'...
building '/nix/store/0gixkqfsr3plwcyf72izycpkr5rf1r6k-udev-rules.drv'...
cannot build derivation '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv': 1 dependencies couldn't be built
error: build of '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv' failed
I have tried removing the offending path by running
$ nix-store --delete /nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv
That path has no 'referrers' according to
$ nix-store -q --referrers /nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv`)
I also garbage-collected using $ nix-store --gc. However, running $ nixos-rebuild switch still re-creates this path and gives the same error again.
Why is $ nixos-rebuild switch creating this path, and how can I get that command running successfully again?
I am not sure why nixos-system-nixos-19.03 is present on my system at all; at this point I am only tracking the nixos-18.09 channel:
$ nixos-channel --list
nixos-18.09 https://nixos.org/channels/nixos-18.09
If you filter through the error message, it's pretty clear about the chain of events:
builder for '/nix/store/mcncvdwadrq1335bwy279dg7q0sxhvhp-python3.6-rsa-4.0.drv' failed with exit code 1
cannot build derivation '/nix/store/pifmbmqallj7jkl3ar1wv8nqyfzq08hr-python3.6-python-jose-3.0.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/3w08jzilgvddzx728nnkpaadc7sd9p2v-python3.6-moto-1.3.7.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/sf4d3zrds99sq22s096f4pdwb2602mf2-python3.6-pandas-0.23.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/hx05mqxryfl1aqvc5lqf0q05n230qnz3-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv': 1 dependencies couldn't be built
error: build of '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv' failed
So, the build of the Python rsa module failed because that package has a bug.
Why do we depend on rsa? Because...
Your system is configured to have a Python 3.6 install with pandas in its default PATH.
pandas depends on the package moto to run its tests (pkgs/development/python-modules/pandas/default.nix:38).
The moto package depends on python-jose (pkgs/development/python-modules/moto/default.nix:44).
The python-jose package depends on the rsa package (pkgs/development/python-modules/python-jose/default.nix:33).
BTW, while this is the case on nixpkgs-unstable, the 18.09 release (latest published as of this answer) doesn't have this dependency from python-jose on rsa, and so doesn't exhibit the issue at hand. Might I suggest using it instead?

Failing to install python-igraph

I'm trying to install python-igraph. After I run sudo pip install python-igraph I got the following log:
Downloading/unpacking python-igraph
Downloading python-igraph-0.7.1-1.tar.gz (375kB): 375kB downloaded
Running setup.py egg_info for package python-igraph
Installing collected packages: python-igraph
Running setup.py install for python-igraph
Cannot find the C core of igraph on this system using pkg-config.
We will now try to download and compile the C core from scratch.
Version number of the C core: 0.7.1-1
Version 0.7.1-1 of the C core of igraph is not found among the nightly builds.
Use the --c-core-version switch to try a different version.
Could not download and compile the C core of igraph.
WARNING: we were not able to detect where igraph is installed on
your machine (if it is installed at all). We will use the fallback
library and include pathss hardcoded in setup.py and hope that the
C core of igraph is installed there.
If the compilation fails and you are sure that igraph is installed
on your machine, adjust the following two variables in setup.py
accordingly and try again:
- LIBIGRAPH_FALLBACK_INCLUDE_DIRS
- LIBIGRAPH_FALLBACK_LIBRARY_DIRS
Build type: dynamic extension
Include path: /usr/include/igraph /usr/local/include/igraph
Library path:
Linked dynamic libraries: igraph
Linked static libraries:
Extra compiler options:
Extra linker options:
building 'igraph._igraph' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/igraph -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o
src/igraphmodule.c:25:20: fatal error: igraph.h: No such file or directory
#include <igraph.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cTa4Ba-record/install-record.txt --single-version-externally-managed:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/igraph
copying igraph/formula.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/__init__.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/configuration.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/summary.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/layout.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/cut.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/datatypes.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/utils.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/clustering.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/statistics.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/matching.py -> build/lib.linux-x86_64-2.7/igraph
copying igraph/compat.py -> build/lib.linux-x86_64-2.7/igraph
creating build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/operators.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/isomorphism.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/__init__.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/colortests.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/conversion.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/homepage.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/attributes.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/vertexseq.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/structural.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/separators.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/atlas.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/layouts.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/rng.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/games.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/utils.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/iterators.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/edgeseq.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/indexing.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/spectral.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/cliques.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/flow.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/basic.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/generators.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/matching.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/foreign.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/bipartite.py -> build/lib.linux-x86_64-2.7/igraph/test
copying igraph/test/decomposition.py -> build/lib.linux-x86_64-2.7/igraph/test
creating build/lib.linux-x86_64-2.7/igraph/app
copying igraph/app/__init__.py -> build/lib.linux-x86_64-2.7/igraph/app
copying igraph/app/shell.py -> build/lib.linux-x86_64-2.7/igraph/app
creating build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/__init__.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/edge.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/shapes.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/coord.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/metamagic.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/utils.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/text.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/graph.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/colors.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/vertex.py -> build/lib.linux-x86_64-2.7/igraph/drawing
copying igraph/drawing/baseclasses.py -> build/lib.linux-x86_64-2.7/igraph/drawing
creating build/lib.linux-x86_64-2.7/igraph/remote
copying igraph/remote/__init__.py -> build/lib.linux-x86_64-2.7/igraph/remote
copying igraph/remote/nexus.py -> build/lib.linux-x86_64-2.7/igraph/remote
copying igraph/remote/gephi.py -> build/lib.linux-x86_64-2.7/igraph/remote
creating build/lib.linux-x86_64-2.7/igraph/vendor
copying igraph/vendor/__init__.py -> build/lib.linux-x86_64-2.7/igraph/vendor
copying igraph/vendor/texttable.py -> build/lib.linux-x86_64-2.7/igraph/vendor
running build_ext
Cannot find the C core of igraph on this system using pkg-config.
We will now try to download and compile the C core from scratch.
Version number of the C core: 0.7.1-1
Version 0.7.1-1 of the C core of igraph is not found among the nightly builds.
Use the --c-core-version switch to try a different version.
Could not download and compile the C core of igraph.
WARNING: we were not able to detect where igraph is installed on
your machine (if it is installed at all). We will use the fallback
library and include pathss hardcoded in setup.py and hope that the
C core of igraph is installed there.
If the compilation fails and you are sure that igraph is installed
on your machine, adjust the following two variables in setup.py
accordingly and try again:
- LIBIGRAPH_FALLBACK_INCLUDE_DIRS
- LIBIGRAPH_FALLBACK_LIBRARY_DIRS
Build type: dynamic extension
Include path: /usr/include/igraph /usr/local/include/igraph
Library path:
Linked dynamic libraries: igraph
Linked static libraries:
Extra compiler options:
Extra linker options:
building 'igraph._igraph' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/igraph -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o
src/igraphmodule.c:25:20: fatal error: igraph.h: No such file or directory
#include <igraph.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cTa4Ba-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/python-igraph
Storing complete log in /home/sergey/.pip/pip.log
And I have similar situation if I do it with sudo python setup.py install.
Apparently the problem is with C core.
How can I install the correct version of it so that I can install igraph?
I use Linux Mint 16 64-bit, python 2.7.
You need igraph libraries before compiling python-igraph.
Try sudo apt-get install -y libigraph0-dev and try install python-igraph again.
Using Ubuntu 16 and Python3.
pip3 install python-igraph
results in error building whell. However,
sudo apt-get install python3-igraph
worked just fine.
For windows users
Download the unofficial python-igraph (according to igraph official installation instruction), please select the appropriate .whl file based on environment (python version, 64bit vs. 32bit).
Open command console and cd into .whl's folder
Execute the following command:
pip install python_igraph-0.7.1.post.xxx.whl
In ubuntu 16.04:
For python 2:
apt-get install build-essential python-dev libxml2 libxml2-dev zlib1g-dev
For python 3:
apt-get install build-essential python3-dev libxml2 libxml2-dev zlib1g-dev
Solved my problem.
For Ubuntu Users :
Add the repository of igraph to apt:
sudo add-apt-repository ppa:igraph/ppa
Then update and install the python-igraph package:
sudo apt-get update
sudo apt-get install python-igraph

Resources