pip install flask-mongoengine报错
报错如下:
Collecting pytz (from -r /srv/wms/engine/requirements.txt (line 5))
Downloading https://pypi.doubanio.com/packages/a3/7f/e7d1acbd433b929168a4fb4182a2ff3c33653717195a26c1de099ad1ef29/pytz-2017.3-py2.py3-none-any.whl (511kB)
100% |████████████████████████████████| 512kB 2.3MB/s
Collecting Flask-login (from -r /requirements.txt (line 6))
Downloading https://pypi.doubanio.com/packages/c1/ff/bd9a4d2d81bf0c07d9e53e8cd3d675c56553719bbefd372df69bf1b3c1e4/Flask-Login-0.4.1.tar.gz
Collecting Flask-wtf (from -r /requirements.txt (line 7))
Downloading https://pypi.doubanio.com/packages/60/3a/58c629472d10539ae5167dc7c1fecfa95dd7d0b7864623931e3776438a24/Flask_WTF-0.14.2-py2.py3-none-any.whl
Requirement already satisfied: requests in /lib/python3.5/site-packages (from -r /requirements.txt (line 8))
Collecting flask_mongoengine (from -r /requirements.txt (line 9))
Downloading https://pypi.doubanio.com/packages/84/4b/6bbd0f232fcc2b363addb847a498584f164a32c2559804c0701ae0de4108/flask-mongoengine-0.9.3.tar.gz (111kB)
100% |████████████████████████████████| 112kB 2.1MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/rednose/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for **'rednose**' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for rednose
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-901ck02u/flask-mongoengine/setup.py", line 74, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
File "/usr/lib64/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/lib64/python3.5/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/lib64/python3.5/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/lib64/python3.5/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/lib64/python3.5/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File /lib64/python3.5/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/lib64/python3.5/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/lib64/python3.5/site-packages/setuptools/command/easy_install.py", line 659, 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 /tmp/pip-build-901ck02u/flask-mongoengine/
解决办法:
要先安装
pip install rednose
pip install nose
pip install coverage
本文转自506554897 51CTO博客,原文链接:http://blog.51cto.com/506554897/2068168,如需转载请自行联系原作者