无法使用requirements.txt在virtualenv上安装python模块 [英] Can't install python modules on virtualenv using requirements.txt

查看:71
本文介绍了无法使用requirements.txt在virtualenv上安装python模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从virtualenv上的requirements.txt文件安装python模块. Pip运行并安装.但是我无法导入已安装的模块,也无法在运行pip freeze时显示.

I am trying to install python modules from a requirements.txt file on a virtualenv. Pip runs, and installs them. But I can't import the modules installed, nor do they show up when I run pip freeze.

这是我运行pip的方式

This is how I run pip

(test)elssar@elssar-laptop:~$ sudo pip install -r /path/to/requirements.txt

我什至尝试从包含requirements.txt的目录中运行该命令,但似乎无济于事.

I have even tried to run that command from the directory containing requirements.txt but nothing seems to work.

我想念什么吗?

推荐答案

尝试在不使用sudo的情况下运行pip;可能会设置一个不同的环境来覆盖virtualenv设置.

Try running pip without sudo; it might set a different environment which overwrites the virtualenv settings.

这篇关于无法使用requirements.txt在virtualenv上安装python模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆