无法安装Flask SQLAlchemy

时间:2014-11-03 12:04:15

标签: python flask flask-sqlalchemy

尝试安装时,我遇到以下错误。我错过了什么?

Install packages failed: Error occurred when installing package Flask-SQLAlchemy. 

The following command was executed:

packaging_tool.py install --build-dir /private/var/folders/4B/4Bd6e77uH-uNGxBS-xhds++++TI/-Tmp-/pycharm-packaging5175396548329498703.tmp Flask-SQLAlchemy

The error output of the command:

Error: Traceback (most recent call last):
  File "/Applications/PyCharm.app/helpers/packaging_tool.py", line 54, in do_install
    import pip
  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

1 个答案:

答案 0 :(得分:1)

这是SO问题得到了几个答案Python ImportError: cannot import name HTTPSHandler

通常,检查您是否安装了ssl模块和OpenSSL头文件。