pip 列出活动 virtualenv 中的全局包 [英] pip listing global packages in active virtualenv

查看:28
本文介绍了pip 列出活动 virtualenv 中的全局包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 pip 从 1.4.x 升级到 1.5 后 pip freeze 输出我全局安装的(系统)包的列表,而不是安装在我的 virtualenv 中的包.我已经尝试再次降级到 1.4,但这并不能解决我的问题.它有点类似于这个问题,只是它按预期工作了几个月.有没有办法调试和/或修复这个?

After upgrading pip from 1.4.x to 1.5 pip freeze outputs a list of my globally installed (system) packages instead of the ones installed inside of my virtualenv. I've tried downgrading to 1.4 again but that does not solve my problem. It's somewhat similar to this question only it's been working as expected for months. Is there any way to debug and/or repair this?

似乎 virtualenv 根本没有效果.在其中安装软件包也会全局安装它们.

It seems like the virtualenv has no effect at all. Installing packages within it installs them globally too.

推荐答案

我在 pip 全局安装软件包而不是在激活的 virtualenv 中也遇到了问题.看看 pip 安装在全局站点包而不是 virtualenv 用于问题(和答案).

I had problems with pip installing packages globally instead of in the activated virtualenv too. Have a look at pip installing in global site-packages instead of virtualenv for the question (and the answer).

基本上,解决方案包括修改 virtualenv 中 pip 脚本的 shebang,因为它们指向错误的 python 安装.

Basically, the solution consisted of modifying the shebang of the pip scripts within the virtualenv as they pointed to the wrong python installation.

这篇关于pip 列出活动 virtualenv 中的全局包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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