我正在尝试基于另一个虚拟环境创建一个虚拟环境,为此,我想使用 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
Run Code Online (Sandbox Code Playgroud)
当我尝试 pip install -rrequirements.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'
Run Code Online (Sandbox Code Playgroud)
所以我需要一种方法来使用 pip 提取信息并在另一个环境中使用 pip 安装它。
peb*_*x11 11
如果您想使用 提取您的需求pip,而不需要任何附加信息(如您发布的信息),请使用:
pip list --format=freeze > requirements.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3819 次 |
| 最近记录: |