简体   繁体   English

requirements.txt包不会在virtualenv中更新

[英]requirements.txt packages do not update in a virtualenv

Need to install packages from requirements.txt to an virtualenv on amazon linux 需要从requirements.txt安装包到amazon linux上的virtualenv

requirement.txt contains: requirement.txt包含:

pandas == 0.17.1
pymongo == 3.2.1

Already in the virtualenv, typed that command: 已经在virtualenv中输入了该命令:

(venv_exporter)[ec2-user@ip-xxx-xxx-xxx-xxx core-exporter]$ pip install -r requirements.txt

Got that at the end of the command: 在命令的最后得到了:

Installing collected packages: numpy, pandas, pymongo
  Running setup.py install for pandas ... done
  Running setup.py install for pymongo ... done
Successfully installed numpy pandas pymongo

Running that command give me that: 运行该命令给我:

(venv_exporter)[ec2-user@ip-xxx-xxx-xxx-xxx core-exporter]$ pip freeze
python-dateutil==2.5.3
pytz==2016.4
six==1.10.0

Why I don't see my installed packages in the list? 为什么我在列表中看不到我安装的软件包?

And obviously my code is saying the packages (from the requirements.txt) are missing 显然我的代码是说缺少包(来自requirements.txt)

I've run into the same issue with Python virtualenv on Amazon Linux. 我在Amazon Linux上遇到了与Python virtualenv相同的问题。

Create a new virtual environment, update pip and then try to install your requirements.txt file. 创建一个新的虚拟环境,更新pip,然后尝试安装您的requirements.txt文件。

$ pip -U pip
$ pip install -r requirements.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM