pipが実行できない
概要
新規でVirtualboxをインストールし、CentOS7にJuptyer Notebookをインストールしようとしたらpipエラー
できるように調べてみる
その辺の記事に書いてあったコマンドを実行。
curl -kL https://bootstrap.pypa.io/get-pip.py | python
This script does not work on Python 2.7 The minimum supported Python version is 3.7 please use https://bootstrap.pypa.io/pip/2.7/get-pip.py insteas.
(このスクリプトは Python 2.7 では動作しません。サポートされている Python の最小バージョンは 3.7 です。https://bootstrap.pypa.io/pip/2.7/get-pip.py を使用してください。)
どうやらインストールするアレは環境によって違うようだぜ。
エラーの内容に従って、再度実行。
curl -kL https://bootstrap.pypa.io/pip/2.7/get-pip.py | python
インストールできた気がしますなぁ!Successfullyっていってるし!
JuptyerNotebookをインストール
pip install jupyter
Juptyerインストール時のエラーを解決する
上記のエラーを翻訳で直してみる
エラー: コマンドが終了ステータス 1 でエラーになりました:
コマンド: /bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t2zUFu/send2trash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-t2zUFu/send2trash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(コンパイル( code, __file__, '"'"'exec'"'"'))' Egg_info --egg-base /tmp/pip-pip-egg-info-jP6ad_
cwd: /tmp/pip-install-t2zUFu/send2trash/
完全な出力 (5 行):
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: 不明な配布オプション: 'long_description_content_type'
warnings.warn(メッセージ)
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: 不明な配布オプション: 'project_urls'
warnings.warn(メッセージ)
Send2Trash セットアップ コマンドのエラー: 'extras_require' は、値が有効なプロジェクト/バージョン要件指定子を含む文字列または文字列のリストである辞書である必要があります。
--------------------------------------------
エラー: コマンドが終了ステータス 1 でエラーになりました: python setup.py egg_info ログで完全なコマンド出力を確認してください。
とりあえずpython setup.py egg_info ログを見ればええんか…?
しかし、めんどそうなので"python setup.py egg_info ログ"でググって検索でヒットしたやつで試してみる。
pip install --upgrade pip setuptools
ERROR: pip's legach dependency sesolver does not consider dependency conflicts when selecting packages.
This behaviour is the source og the following dependency conflicts.
ipapython 4.6.8 requres dnspython>=1.15, but you'll have dnspython 1.12.0 which is incompatible.
ipapython 4.6.8 requres python-ldap>=3.0.0b1, but you'll have python-ldap 2.4.15 which is incompatible.
エラー: pip のレガシー依存関係セソルバーは、パッケージを選択するときに依存関係の競合を考慮しません。
この動作は、次の依存関係の競合の原因です。
ipapython 4.6.8 には dnspython>=1.15 が必要ですが、互換性のない dnspython 1.12.0 が必要です。
ipapython 4.6.8 には python-ldap>=3.0.0b1 が必要ですが、互換性のない python-ldap 2.4.15 が必要です。
依存系のうんちゃらっぽいのでスルー
再度実行!
ERROR: Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
エラー: 'pyparsing' をアンインストールできません。これは distutils がインストールされたプロジェクトであるため、どのファイルがそれに属しているかを正確に判断できず、部分的なアンインストールのみが発生します。
ググった結果、pyparsingを更新すればいいということらしい。
再度実行
こっちもインストール
こっちもエラーなし!
Jupyter Notebook実行
コンソールより、以下を入力
起動できたぜ。
完