我在Ubuntu 16.04
,python 2.7
上。
我无法安装cyordereddict
sudo python -m pip install cyordereddict
The directory '/home/amitn/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/amitn/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cyordereddict
Downloading https://files.pythonhosted.org/packages/d1/1a/364cbfd927be1b743c7f0a985a7f1f7e8a51469619f9fefe4ee9240ba210/cyordereddict-1.0.0.tar.gz (138kB)
100% |████████████████████████████████| 143kB 592kB/s
Installing collected packages: cyordereddict
Running setup.py install for cyordereddict ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Pslw4h/cyordereddict/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-jxtmtk/install-record.txt --single-version-externally-managed --compile:
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/cyordereddict
copying python2/cyordereddict/_version.py -> build/lib.linux-x86_64-2.7/cyordereddict
copying python2/cyordereddict/__init__.py -> build/lib.linux-x86_64-2.7/cyordereddict
creating build/lib.linux-x86_64-2.7/cyordereddict/benchmark
copying python2/cyordereddict/benchmark/magic_timeit.py -> build/lib.linux-x86_64-2.7/cyordereddict/benchmark
copying python2/cyordereddict/benchmark/benchmark.py -> build/lib.linux-x86_64-2.7/cyordereddict/benchmark
copying python2/cyordereddict/benchmark/__init__.py -> build/lib.linux-x86_64-2.7/cyordereddict/benchmark
creating build/lib.linux-x86_64-2.7/cyordereddict/test
copying python2/cyordereddict/test/_mapping_tests.py -> build/lib.linux-x86_64-2.7/cyordereddict/test
copying python2/cyordereddict/test/test_ordereddict.py -> build/lib.linux-x86_64-2.7/cyordereddict/test
copying python2/cyordereddict/test/_test_support.py -> build/lib.linux-x86_64-2.7/cyordereddict/test
copying python2/cyordereddict/test/test_cyordereddict.py -> build/lib.linux-x86_64-2.7/cyordereddict/test
copying python2/cyordereddict/test/__init__.py -> build/lib.linux-x86_64-2.7/cyordereddict/test
running build_ext
building 'cyordereddict._cyordereddict' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/python2
creating build/temp.linux-x86_64-2.7/python2/cyordereddict
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c python2/cyordereddict/_cyordereddict.c -o build/temp.linux-x86_64-2.7/python2/cyordereddict/_cyordereddict.o
python2/cyordereddict/_cyordereddict.c:12: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 "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Pslw4h/cyordereddict/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-jxtmtk/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-Pslw4h/cyordereddict/
我们将不胜感激任何帮助。