安装python软件包给出了找不到轮子的错误

时间:2019-07-20 20:27:34

标签: python

我运行以下命令:

!pip install --user pyemd

错误:

Collecting pyemd
  Using cached https://files.pythonhosted.org/packages/c0/c5/7fea8e7a71cd026b30ed3c40e4c5ea13a173e28f8855da17e25271e8f545/pyemd-0.5.1.tar.gz
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in ./env/lib/python3.6/site-packages (from pyemd) (1.16.4)
Building wheels for collected packages: pyemd
  Building wheel for pyemd (setup.py) ... error
  ERROR: Complete output from command /data/users/msmith/env/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-4td3ouli/pyemd/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-vo58ku2w --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/pyemd
  copying pyemd/__init__.py -> build/lib.linux-x86_64-3.6/pyemd
  copying pyemd/__about__.py -> build/lib.linux-x86_64-3.6/pyemd
  running build_ext
  building 'pyemd.emd' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/pyemd
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/data/users/msmith/env/include -I/usr/include/python3.6m -I/data/users/msmith/env/lib64/python3.6/site-packages/numpy/core/include -c pyemd/emd.cpp -o build/temp.linux-x86_64-3.6/pyemd/emd.o
  pyemd/emd.cpp:23:20: fatal error: Python.h: No such file or directory
   #include "Python.h"
                      ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyemd
  Running setup.py clean for pyemd
Failed to build pyemd
Installing collected packages: pyemd
  Running setup.py install for pyemd ... error
    ERROR: Complete output from command /data/users/msmith/env/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-4td3ouli/pyemd/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-uaakcbbf/install-record.txt --single-version-externally-managed --compile --install-headers /data/users/msmith/env/include/site/python3.6/pyemd --user --prefix=:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pyemd
    copying pyemd/__init__.py -> build/lib.linux-x86_64-3.6/pyemd
    copying pyemd/__about__.py -> build/lib.linux-x86_64-3.6/pyemd
    running build_ext
    building 'pyemd.emd' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/pyemd
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/data/users/msmith/env/include -I/usr/include/python3.6m -I/data/users/msmith/env/lib64/python3.6/site-packages/numpy/core/include -c pyemd/emd.cpp -o build/temp.linux-x86_64-3.6/pyemd/emd.o
    pyemd/emd.cpp:23:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/data/users/msmith/env/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-4td3ouli/pyemd/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-uaakcbbf/install-record.txt --single-version-externally-managed --compile --install-headers /data/users/msmith/env/include/site/python3.6/pyemd --user --prefix=" failed with error code 1 in /tmp/pip-install-4td3ouli/pyemd/

我已经关注了这个github问题页面:https://github.com/wmayner/pyemd/issues/28

我要去哪里错了?

0 个答案:

没有答案