为什么pip在我的虚拟环境之外安装软件包? [英] Why does pip installs a package outside my virtual environment?

查看:178
本文介绍了为什么pip在我的虚拟环境之外安装软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完成虚拟环境的源代码后,我尝试

After doing a source of the virtual environment I try

pip install -U --no-deps django-social-auth

并返回:

OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/django_social_auth-0.6.9-py2.6.egg-info/dependency_links.txt'

为什么要尝试在virtualenv之外写?

Why is it trying to write outside the virtualenv?

推荐答案

重命名包含虚拟环境的目录时,我遇到了这个问题.点使用的硬路径不再正确.

I ran into this problem when I renamed the directory containing my virtual environment. The hard path pip was using was no longer correct.

更新pip脚本中的shebang以指向您的虚拟环境的python可执行文件.

Update the shebang in the pip script to point to your virtual environment's python executable.

这篇关于为什么pip在我的虚拟环境之外安装软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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