2016-06-13 32 views
0

私は教科書を使っていましたが、その1つの例ではpythonにmahotasが必要でした。私はすぐにピップでそれをインストールしようとした、とすぐにこのエラーを得た:mahotasをインストールできません。python-devをインストールしてもエラーは修正されませんでした

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DPY_ARRAY_UNIQUE_SYMBOL=Mahotas_PyArray_API_Symbol -I/usr/local/lib/python3.4/dist-packages/numpy/core/include -I/usr/include/python3.4m -c mahotas/_convex.cpp -o build/temp.linux-x86_64-3.4/mahotas/_convex.o 
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
    In file included from mahotas/numpypp/array.hpp:17:0, 
        from mahotas/_convex.cpp:7: 
    mahotas/numpypp/numpy.hpp:10:20: fatal error: Python.h: No such file or directory 
    #include <Python.h> 
        ^
    compilation terminated. 
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

---------------------------------------- 
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-kzn3_c4k/mahotas/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-y19bwul7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-kzn3_c4k/mahotas/ 

は今、他の#include <Python.h>error: command 'x86_64-linux-gnu-gccエラーを検索した後、私はpython-devをインストールするように言わ得続けます。

The following packages have unmet dependencies: 
python3-dev : Depends: libpython3-dev (= 3.4.0-0ubuntu2) but it is not going to be installed 
      Depends: python3.4-dev (>= 3.4.0-0~) but it is not going to be installed 
E: Unable to correct problems, you have held broken packages. 

そして、私はそれらをインストールしようとすると:python-devはすでに最新バージョンです、そしてpython3-devのために、私はこれを取得するよう は残念ながら、それは、同様にすぐに失敗しましたか?

A:

The following packages have unmet dependencies: 
libpython3-dev : Depends: libpython3.4-dev (>= 3.4.0-0~) but it is not going to be installed 
E: Unable to correct problems, you have held broken packages. 

、次いで:

The following packages have unmet dependencies: 
libpython3.4-dev : Depends: libpython3.4-stdlib (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed 
        Depends: libpython3.4 (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed 
E: Unable to correct problems, you have held broken packages. 

B:

The following packages have unmet dependencies: 
python3.4-dev : Depends: python3.4 (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed 
       Depends: libpython3.4-dev (= 3.4.0-2ubuntu1) but it is not going to be installed 
       Depends: libpython3.4 (= 3.4.0-2ubuntu1) but 3.4.3-1ubuntu1~14.04.3 is to be installed 
E: Unable to correct problems, you have held broken packages. 

これはウサギの穴です。どうすればエスケープできますか?

答えて

1

(ここのマホタの著者)

あなたのUbuntuのインストールは、Python-devパッケージのいくつかの奇妙な状態になっています。そして、あなたはconda鍛造プロジェクトからmahotasを得ることができますhttps://www.continuum.io/why-anaconda

::ウサギの穴から抜け出すための私の推薦は、アナコンダを使用することですhttps://anaconda.org/conda-forge/mahotas

Conda鍛造は、現在までにそれを維持しますコミュニティプロジェクトであります。アナコンダには他の利点もあります。

+0

一言...私はあなたがそれを言うのは恐れていました。しばらく前に私はanacondaをインストールしましたが、私は過度に依存しないように使用しませんでした。 – Rich

+0

私のpythonを修正する方法はありませんか? – Rich

+0

編集:私はそれをインストールしようとしましたが、それは 'PermissionError:[Errno 13] Permission denied:'エラーを与え続けます。 – Rich

関連する問題