python - pip3 install Flask-MongoEngine 安装失败

标签 python python-3.x mongoengine setup.py flask-mongoengine

我打算用 Python 3.4 安装 Flask-MongoEngine,这是我的 Mac 上安装的。当我尝试通过 pip3 安装 Flask-MongoEngine 时出现以下错误并且不确定如何解决?

sudo pip3 install Flask-MongoEngine


    The directory '/Users/mastarke/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/mastarke/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting Flask-MongoEngine
      Downloading https://files.pythonhosted.org/packages/20/53/1bb8ad34ad5c2047a11651290325e55086bc18fce7cfdbbe6f5522bd0ae5/flask-mongoengine-0.9.5.tar.gz (111kB)
        100% |████████████████████████████████| 194kB 4.0MB/s 
        Complete output from command python setup.py egg_info:
        Download error on https://pypi.python.org/simple/rednose/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:600) -- Some packages may not be found!
        Couldn't find index page for 'rednose' (maybe misspelled?)
        Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:600) -- Some packages may not be found!
        No local packages or download links found for rednose
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/tmp/pip-install-6wad5e5g/Flask-MongoEngine/setup.py", line 74, in <module>
            'Topic :: Software Development :: Libraries :: Python Modules'
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 108, in setup
            _setup_distribution = dist = klass(attrs)
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py", line 269, in __init__
            self.fetch_build_eggs(attrs['setup_requires'])
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
            replace_conflicting=True,
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 826, in resolve
            dist = best[req.key] = env.best_match(req, ws, installer)
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1092, in best_match
            return self.obtain(req, installer)
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1104, in obtain
            return installer(requirement)
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
            return cmd.easy_install(req)
          File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 658, in easy_install
            raise DistutilsError(msg)
        distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('rednose')

        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-6wad5e5g/Flask-MongoEngine/

最佳答案

这看起来像是您公司代理的问题。

关于python - pip3 install Flask-MongoEngine 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51696532/

相关文章:

python - 如何在openerp序列中的_interpolation_dict中创建新属性?

python - 在 Python 中检查字符串的 Python 语法?

python - For循环迭代似乎跳过了列表中的两个数字

Python 3.1 RSS 解析器?

python - 为什么我的sql不执行?

python - 如何访问 N*M*M numpy 数组的下三角

python-3.x - Python 模块 'csv' 没有属性 'DictReader'

python - 无法保存 pickle 的 MongoEngine 文档

python - PyMongo/Mongoengine 相当于 mongodump

python - 如何使用flask-restplus的fields.Url进行mongoengine文档查询集?