gpt4 book ai didi

virtualenv - pip -r 在 vi​​rtualenv 中没有按预期工作

转载 作者:行者123 更新时间:2023-12-04 23:52:13 24 4
gpt4 key购买 nike

我对 pip 在 vi​​rtualenv 中的行为有一个非常奇怪的问题。

我已经设置了

export PIP_REQUIRE_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
export VIRTUALENV_DISTRIBUTE=true

现在,当我在我的 virtualenv 中并想要安装我的依赖项时:

pip install -r requirements/_base.txt

(出于测试目的,requirements/_base.txt 只包含:)

Django==1.5

无论如何,当我尝试安装它时,我只得到:

Downloading/unpacking Django==1.5 (from -r requirements/_base.txt (line 1))
Running setup.py egg_info for package Django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'

之后,Django 没有安装。

奇怪的部分来了:当我手动安装 Django 时

pip install Django==1.5

它运行良好(尽管出现了相同的两个警告):

Downloading/unpacking Django==1.5
Running setup.py egg_info for package Django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/share/python/django-admin.py to 755
Successfully installed Django
Cleaning up...

最佳答案

我遇到了类似的问题,并意识到删除版本要求可以解决问题。不知道为什么...

关于virtualenv - pip -r 在 vi​​rtualenv 中没有按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15429515/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com