私はvirtualenvを初めて使っていて、特定のプロジェクトで作業するために、それを稼働させようとしていました。私はそれをすべて設定するthisガイドに続いた。私がvirtualenvに入るとすぐに、pipは上記のエラーで動作しなくなります。Virtualenv pip ssl - パッケージのインストール中に失敗します。エラー:「Pythonのsslモジュールが利用できません」
ここでの正確な問題はこのこと:それは私が見つけることができないいくつかのパッケージを必要とするため
(virtual-env) $ pip install --trusted-host pypi.python.org Django==1.11.4
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting Django==1.11.4
Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement Django==1.11.4 (from versions:)
No matching distribution found for Django==1.11.4
...はい... --trusted-host
は...それはそう、違いはありません。
バージョン:
Pythonの
$ python --version Python 3.6.2
ピップ
$ pip --version # <- Edited pip 9.0.1
私はなく、無駄に、SSLモジュールをインストールしようとしました。あなたはpython 3でsslをインストールすることはできません。問題は印刷sintaxです。
[...]
File "/tmp/pip-build-undfmh27/ssl/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'
すべてのヘルプは
いくつかのメモ。 'pip3 --version'を表示しますが、' pip install'を実行してください。 'pip'ではなく' pip3'がPython 2.7とされています。 'print'のカッコが見つからないというエラーはPy2対Py3です:python 3では' print'は 'print()'関数です。 PyPIのモジュール 'ssl'は[Py2のみ](https://github.com/pypa/ssl/issues/7)です。 Py3のために何かをインストールする必要はありません。すべてはすでにPythonに入っています。 – phd
あなたはほぼ正しいです。事は、virtualenv内で、pipはpip3へのシンボリックリンクに過ぎません。私は明確にするために質問を編集しました。ありがとうございました! – coya