文章内容
2018/7/5 17:21:19,作 者: 黄兵
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ow5feu0g/pycurl/
最近要在服务器上面部署一个应用程序,但是安装的时候出现了一下问题:
(venv) root@vps6:/var/pppoe-server# pip install pycurl Collecting pycurl Downloading https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz (214kB) 100% |████████████████████████████████| 215kB 1.3MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "/tmp/pip-install-ow5feu0g/pycurl/setup.py", line 223, in configure_unix stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'curl-config' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-ow5feu0g/pycurl/setup.py", line 913, in ext = get_extension(sys.argv, split_extension_source=split_extension_source) File "/tmp/pip-install-ow5feu0g/pycurl/setup.py", line 582, in get_extension ext_config = ExtensionConfiguration(argv) File "/tmp/pip-install-ow5feu0g/pycurl/setup.py", line 99, in __init__ self.configure() File "/tmp/pip-install-ow5feu0g/pycurl/setup.py", line 227, in configure_unix raise ConfigurationError(msg) __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ow5feu0g/pycurl/
我参考了这篇文章:Could not run curl-config 的解决方式
但是又爆出了新的错误:
(venv) root@vps6:/var/pppoe-server# apt-get install libcurl4-gnutls-dev Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-4.4.0-124 linux-headers-4.4.0-124-generic linux-headers-4.4.0-127 linux-headers-4.4.0-127-generic linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-124-generic linux-image-4.4.0-127-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-124-generic linux-image-extra-4.4.0-127-generic linux-image-extra-4.4.0-31-generic Use 'apt autoremove' to remove them. Suggested packages: libcurl4-doc libcurl3-dbg libgnutls-dev libidn11-dev libkrb5-dev libldap2-dev librtmp-dev pkg-config zlib1g-dev The following NEW packages will be installed: libcurl4-gnutls-dev 0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded. Need to get 261 kB of archives. After this operation, 1,251 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl4-gnutls-dev amd64 7.47.0-1ubuntu2.8 [261 kB] Fetched 261 kB in 0s (333 kB/s) Selecting previously unselected package libcurl4-gnutls-dev:amd64. (Reading database ... 198577 files and directories currently installed.) Preparing to unpack .../libcurl4-gnutls-dev_7.47.0-1ubuntu2.8_amd64.deb ... Unpacking libcurl4-gnutls-dev:amd64 (7.47.0-1ubuntu2.8) ... Processing triggers for man-db (2.7.5-1) ... Setting up libcurl4-gnutls-dev:amd64 (7.47.0-1ubuntu2.8) ... (venv) root@vps6:/var/pppoe-server# pip install pycurl Collecting pycurl Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz Building wheels for collected packages: pycurl Running setup.py bdist_wheel for pycurl ... error Complete output from command /var/pppoe-server/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ypibi53/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-nffksoxa --python-tag cp35: Using curl-config (libcurl 7.47.0) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.5 creating build/lib.linux-x86_64-3.5/curl copying python/curl/__init__.py -> build/lib.linux-x86_64-3.5/curl running build_ext building 'pycurl' extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCURL_VERSION="7.43.0.2" -DHAVE_CURL_SSL=1 -DHAVE_CURL_GNUTLS=1 -DHAVE_CURL_SSL=1 -I/usr/include/python3.5m -I/var/pppoe-server/venv/include/python3.5m -c src/docstrings.c -o build/temp.linux-x86_64-3.5/src/docstrings.o In file included from src/docstrings.c:4:0: src/pycurl.h:4:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for pycurl Running setup.py clean for pycurl Failed to build pycurl Installing collected packages: pycurl Running setup.py install for pycurl ... error Complete output from command /var/pppoe-server/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ypibi53/pycurl/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-record-8l0st0nw/install-record.txt --single-version-externally-managed --compile --install-headers /var/pppoe-server/venv/include/site/python3.5/pycurl: Using curl-config (libcurl 7.47.0) running install running build running build_py creating build creating build/lib.linux-x86_64-3.5 creating build/lib.linux-x86_64-3.5/curl copying python/curl/__init__.py -> build/lib.linux-x86_64-3.5/curl running build_ext building 'pycurl' extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCURL_VERSION="7.43.0.2" -DHAVE_CURL_SSL=1 -DHAVE_CURL_GNUTLS=1 -DHAVE_CURL_SSL=1 -I/usr/include/python3.5m -I/var/pppoe-server/venv/include/python3.5m -c src/docstrings.c -o build/temp.linux-x86_64-3.5/src/docstrings.o In file included from src/docstrings.c:4:0: src/pycurl.h:4:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Command "/var/pppoe-server/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ypibi53/pycurl/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-record-8l0st0nw/install-record.txt --single-version-externally-managed --compile --install-headers /var/pppoe-server/venv/include/site/python3.5/pycurl" failed with error code 1 in /tmp/pip-install-8ypibi53/pycurl/
之后参考了这篇文章:' error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 '
黄兵个人博客原创。
转载请注明出处:黄兵个人博客 - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ow5feu0g/pycurl/
e on 回复 有用(0)
e