pythonz, virtualenv, virtualenvwrapperを利用しています。
mkvirtualenvで新しい環境(Python2.7.6)を作ってpipで各種パッケージをインストールしようとすると、以下のエラーが出てインストールができません。
pip install numpy pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting numpy Could not fetch URL https://pypi.python.org/simple/numpy/: 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 numpy (from versions: ) No matching distribution found for numpy
これはnumpyの例ですが、他のパッケージでも同様です。
試しに以下のコードを試すと、_sslモジュールが無いと言われてしまいますがこの原因がわかる方いらっしゃいますでしょうか?
python Python 2.7.6 (default, Nov 18 2016, 05:36:51) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/nishimura/.pythonz/pythons/CPython-2.7.6/lib/python2.7/ssl.py", line 60, in <module> import _ssl # if we can't import it, let the error propagate ImportError: No module named _ssl >>>
opensslのバージョンはOpenSSL 1.0.2j 26 Sep 2016です。
ちなみに、virtualenv環境ではないpythonでは問題なく動いております。
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/18 16:05