Erreur python / pip sur osx
J'ai récemment acheté un nouveau disque dur et installé une nouvelle version de OS X Mavericks. J'ai installé python en utilisant le homebrew et j'ai besoin de créer un environnement virtuel python. Mais lorsque j'ai jamais essayer d'exécuter une commande à l'aide de pip, j'ai cette erreur. Je n'ai pas été capable de trouver une solution en ligne pour ce problème. Toute référence serait appréciée. Voici l'erreur que je reçois.
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 356, in load_entry_point
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2439, in load_entry_point
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2155, in load
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 18, in <module>
from pip._vendor.distlib import version
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/version.py", line 14, in <module>
from .compat import string_types
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/compat.py", line 31, in <module>
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler
Si vous avez besoin d'informations supplémentaires de moi laissez-moi savoir, c'est ma première fois de poster une question ici. Merci.
source d'informationauteur Ibrahim Chawa
Vous devez vous connecter pour publier un commentaire.
Ok j'ai trouvé en ligne, que ces erreurs sont liées à openssl. Mais j'ai déjà eu openssl installé. Un peu plus de recherche, et j'ai essayé le suivant et il a résolu le problème pour moi. Voici ma solution dans le cas où vous obtenez la même erreur.
Espère que ça aide.
La
brew install openssl
solution ci-dessus n'a pas fonctionné avec l'aide de Python 3. Puis j'ai réalisé que j'avais installé Python 3.4.2 mais le "Non HTTPSHandler" exception était à la recherche dans/usr/local/Cellar/python3/3.4.1/...
.Après la suppression de tous les anciens Python 3 chemins et réinstallation de virtualenv, il fonctionne à nouveau:
Noter que
install --upgrade
n'ai pas de travail, doit d'abord être désinstallée.Eu la même erreur sur 10.10 lorsque vous essayez d'installer pygame. Il fixe par infusion supprimer python3 ensuite installé python3.4.2 à partir de python.org avec l'état actif tcl.
Erreur disparu
alors
pip3 installer virtualenv
Vous recevrez un message avec brew doctor
Avertissement: Python est installé dans /Library/Frameworks/Python.cadre
Homebrew prend uniquement en charge la construction contre fournies par le Système de Python ou un
brassée Python. En particulier, les Pythons sont installés dans /Bibliothèque peuvent interférer
avec un autre logiciel installe.
Qui pour moi n'a pas d'importance tant que je préfère m'en tenir avec python.org installe donc python est le même sur les plates-formes plutôt que de les différents, en infusion (ont eu des problèmes avant)
J'ai dû ajouter manuellement de la bibliothèque de liaison à rendre cela fonctionne parce que j'ai eu d'erreur avec
brew link openssl --force