尝试安装Flask扩展时出错

时间:2021-08-06 17:42:45

I'm working through the following tutorial:

我正在完成以下教程:

http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

I have created a virtual environment and have been trying to install the following extensions:

我创建了一个虚拟环境,并一直在尝试安装以下扩展:

flask/bin/pip install flask==0.9
flask/bin/pip install flask-login
flask/bin/pip install flask-openid
flask/bin/pip install flask-mail==0.7.6
flask/bin/pip install sqlalchemy==0.7.9
flask/bin/pip install flask-sqlalchemy==0.16
flask/bin/pip install sqlalchemy-migrate==0.7.2
flask/bin/pip install flask-whooshalchemy==0.54a
flask/bin/pip install flask-wtf==0.8.4
flask/bin/pip install pytz==2013b
flask/bin/pip install flask-babel==0.8
flask/bin/pip install flup

When I run them I get the following error message for each one:

当我运行它们时,我得到每个错误消息:

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /Users/seanpatterson/.pip/pip.log

From reading my thoughts are I'm running an old version of setup tools, but I'm not sure how to upgrade this, or what setup file it would be. Any thoughts?

从阅读我的想法是我正在运行旧版本的设置工具,但我不知道如何升级它,或者它将是什么设置文件。有什么想法吗?

2 个解决方案

#1


1  

pip install -U setuptools should do the trick.

pip install -U setuptools应该可以解决问题。

#2


0  

Try this:

尝试这个:

flask/bin/pip install --upgrade setuptools

If you don't specify the pip in your virtual environment your system will look through its $PATH for pip. Your virtual environment probably isn't in one of the directories in the system path and as a result won't be found.

如果您未在虚拟环境中指定pip,系统将通过其$ PATH查看pip。您的虚拟环境可能不在系统路径中的某个目录中,因此无法找到。

#1


1  

pip install -U setuptools should do the trick.

pip install -U setuptools应该可以解决问题。

#2


0  

Try this:

尝试这个:

flask/bin/pip install --upgrade setuptools

If you don't specify the pip in your virtual environment your system will look through its $PATH for pip. Your virtual environment probably isn't in one of the directories in the system path and as a result won't be found.

如果您未在虚拟环境中指定pip,系统将通过其$ PATH查看pip。您的虚拟环境可能不在系统路径中的某个目录中,因此无法找到。