2017-01-21 11 views
0

python 3用にcvxoptパッケージを使用する必要があります。私はUbuntuを実行します。tar.gzからpythonパッケージをインストールする

だから私はcvxopt-1.1.9.tar.gzをダウンロードして手動でフォルダ /ホーム/ MYNAME/TargetFolder/ にコンテンツ(cvxopt-1.1.9と呼ばれる単一のフォルダ)を抽出し、いないコマンドウィンドウを経由して。

  1. 私がシーケンス.configureを実行し、makeしてからsudoをインストールすると、いずれも動作しません。

  2. /home/myname/TargetFolder/cvxopt-1.1.9/にsetup.pyファイルがあります。私は、コマンドウィンドウと型のpython setup.pyにそのディレクトリに移動すると、その後、インストールI次のエラーメッセージが出ます:

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the installation directory:

[Errno 13] Permission denied: '/home/myname/anaconda3/lib/python3.5/site-packages/test-easy-install-6110.write-test' 

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/home/myname/anaconda3/lib/python3.5/site-packages/ 

Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.

For information on other options, you may wish to consult the documentation at:

https://pythonhosted.org/setuptools/easy_install.html

このリンクはもう存在しません。

  1. 私はhttp://cvxopt.org/install/のアドバイスに従います。私のためにはうまくいかなかった "python setup.py install"コマンドとは別に、リストの2番目のものを試しました。すなわち "cvxoptをインストールPIP" これは与えた:

Collecting cvxopt Downloading cvxopt-1.1.9.tar.gz (1.9MB) 100% |████████████████████████████████| 1.9MB 271kB/s Building wheels for collected packages: cvxopt Running setup.py bdist_wheel for cvxopt Complete output from command /home/myname/anaconda3/bin/python3 -c >"import setuptools;file='/tmp/pip-build-r3o_hfm6/cvxopt/setup.py';>exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpv0ura7txpip-wheel-:

running bdist_wheel running a lot of other stuff

、その後

/usr/bin/ld: cannot find -llapack /usr/bin/ld: cannot find -lblas collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1


Failed building wheel for cvxopt Failed to build cvxopt

、その後

Installing collected packages: cvxopt Running setup.py install for cvxopt Complete output from command /home/myname/anaconda3/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip-build-r3o_hfm6/cvxopt/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-1f4yz1xm-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py UPDATING build/lib.linux-x86_64-3.5/cvxopt/_version.py set build/lib.linux-x86_64-3.5/cvxopt/_version.py to '1.1.9' running build_ext building 'base' extension

をして、いくつかのより多くの行の後に、それは言う:

/usr/bin/ld: cannot find -llapack /usr/bin/ld: cannot find -lblas collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1


Command "/home/myname/anaconda3/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip-build-r3o_hfm6/cvxopt/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-1f4yz1xm-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-r3o_hfm6/cvxopt You are using pip version 7.1.2, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

LinuxとPythonについてもっと理解していれば、重要なことに焦点を当て、投稿を少し短くすることができました。しかし、私は何も知らないので、私は有用な反応の可能性を最大限にするために私がしたすべてを投稿します。

多分私はPythonの仕組みを理解していないかもしれません。私はパッケージが含まれている場合、私は

import package

コマンドでこれを行います。しかしimport cvxoptは機能しません。だから私はそれが正確に何をしているのか分かっていれば、それを探している場所にcvxoptパッケージを与えるためにロジックを使うことができるかもしれません。

答えて

1

Ubuntuを使用しているので、単純に私は16.04でこのようにそれをインストールすることができますsudo apt-get install python-cvxopt

を実行します。実行しているバージョンがわからない

依存関係(blas)がないため、コンパイラ(gcc)が不平を言っているように見えます。パッケージマネージャーを使用してインストールすると、問題が解決するはずです。

+0

私は素晴らしいアイデアですパッケージマネージャを使用する場合、(感謝!!)そして、私は、次のメッセージが表示されます: のpython-cvxopt: 次のパッケージが満たされていない依存関係を持っているが依存:libc6の(> = 2.14)しかし、2.23-0ubuntu5がインストールされます 依存:libglpk36(> = 4.51)しかし4.57-1build3がインストールされます 依存:python(> = 2.7)しかし2.7.11-1がインストールされます – Marlo

+0

ない?もしそれがインストールされていて、依存関係が満たされていなければ、 '' sudo apt-get install -f'''を使ってそれを修正することができます。また、コマンドを実行する前に更新することもできます(これは暗黙のうちにこれを一旦中止しておきましたが、あなたはLinuxの初心者であることを示唆していました) '' 'sudo apt-get update'''です。 – Bryant

+0

いいえ、それはインストールされませんでした。 apt-get updateでアップデートしました。私はsudo apt-getをインストールしました。-fと とsudo apt-getは、python-cvxoptまたはその2つの組み合わせをインストールします。しかし、私は得ました: 以下のパッケージには、依存関係がありません: python-cvxopt:依存:libgsl2ですが、インストールされません。 E:問題を訂正できません。 – Marlo

関連する問題