gpt4 book ai didi

python - `pip3 freeze` 开头打印很多包

转载 作者:太空宇宙 更新时间:2023-11-04 00:16:37 25 4
gpt4 key购买 nike

我创建了 virtualenv 并命令了 pip3 freeze 因为我正在使用 python3 来运行我的项目。

virtualenv .
source bin/activate
pip3 freeze

然而,pip3 freeze 打印了默认(?)python3 包,即使我还没有安装任何包:

backports.weakref==1.0rc1
bleach==1.5.0
certifi==2017.7.27.1
chardet==3.0.4
configparser==3.5.0
defusedxml==0.5.0
Django==1.11.12
django-allauth==0.32.0
django-crispy-forms==1.6.1
django-filter==1.0.4
django-widget-tweaks==1.4.1
djangorestframework==3.7.7
enum34==1.1.6
flake8==3.4.1
flake8-docstrings==1.1.0
flake8-polyfill==1.0.1
html5lib==0.9999999
idna==2.5
Keras==2.0.6
Markdown==2.6.8
mccabe==0.6.1
numpy==1.13.1
oauthlib==2.0.2
olefile==0.44
Pillow==4.2.1
protobuf==3.3.0
pycodestyle==2.3.1
pydocstyle==2.0.0
pyflakes==1.5.0
python3-openid==3.1.0
pytz==2018.3
PyYAML==3.12
requests==2.18.3
requests-oauthlib==0.8.0
scipy==0.19.1
six==1.10.0
snowballstemmer==1.2.1
tensorflow==1.2.1
Theano==0.9.0
urllib3==1.22
Werkzeug==0.12.2

显然我不想为我的虚拟机安装 tensorflow 和 Theano。 :(

为什么它有默认的(?)python3 包?我们可以从头开始吗?

最佳答案

如果可以的话,你确实有包裹import他们。

import sys然后检查print(sys.path)哪些目录中有您的包。

通常是类似 site-packages 的目录将被列出。

您可以 pip3 uninstall <package>如果不需要,请从 site-packages 中删除目录。但是pip3 uninstall是首选。

请注意,您还可以通过以下方式了解您的包裹位置:pip3 show numpy

打印:

Name: numpy
Version: 1.14.3
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: c:\python36\lib\site-packages
Requires:
Required-by: scipy, pandas

关于python - `pip3 freeze` 开头打印很多包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50731010/

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