【发布时间】:2021-04-04 12:25:13
【问题描述】:
我正在尝试基于另一个虚拟环境创建一个虚拟环境,为此,我想使用 pip freeze> requirements.txt 从库中提取信息以用于 Django 环境
但是输出是
asgiref @ file:///tmp/build/80754af9/asgiref_1605055780383/work
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
cryptography==3.4.7
cycler==0.10.0
Django @ file:///tmp/build/80754af9/django_1613762073373/work
django-clear-cache==0.3
djangorestframework==3.12.4
idna==2.10
kiwisolver==1.3.1
matplotlib==3.4.1
numpy==1.20.2
Pillow==8.2.0
psycopg2 @ file:///C:/ci/psycopg2_1612298766762/work
pycparser==2.20
PyMySQL==1.0.2
pyparsing==2.4.7
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.8.1
python-dateutil==2.8.1
pytz @ file:///tmp/build/80754af9/pytz_1612215392582/work
requests==2.25.1
six==1.15.0
sqlparse @ file:///tmp/build/80754af9/sqlparse_1602184451250/work
urllib3==1.26.4
wincertstore==0.2
当我尝试 pip install -r requirements.txt 时不起作用。
输出
Processing c:\tmp\build\80754af9\asgiref_1605055780383\work
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\tmp\\build\\80754af9\\asgiref_1605055780383\\work'
所以我需要一种方法来使用 pip 提取信息并在另一个环境中使用 pip 安装它。
【问题讨论】: