python - pip3requirements.txt 充满垃圾

标签 python linux ubuntu pip ubuntu-18.04

我目前运行的是 Ubuntu 18.04,每当我执行 pip3 freeze >requirement.txt 时,我都会得到以下巨大列表。根据我的研究,某些安装的依赖项似乎最终出现在这个列表中。

我的问题是,如何删除大部分垃圾,或者至少卸载所有内容以重新开始。谢谢

apturl==0.5.2
asn1crypto==0.24.0
attrs==19.1.0
backcall==0.1.0
bleach==3.1.0
Brlapi==0.6.6
certifi==2019.3.9
chardet==3.0.4
Click==7.0
command-not-found==0.3
cryptography==2.1.4
cupshelpers==1.0
cycler==0.10.0
decorator==4.3.2
defer==1.0.6
defusedxml==0.5.0
distro-info==0.18
docopt==0.6.2
entrypoints==0.3
Flask==1.0.2
Flask-Caching==1.6.0
gunicorn==19.9.0
httplib2==0.9.2
idna==2.8
ipykernel==5.1.0
ipython==7.3.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
itsdangerous==1.1.0
jedi==0.13.3
Jinja2==2.10
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
keyring==10.6.0
keyrings.alt==3.0
kiwisolver==1.0.1
language-selector==0.1
launchpadlib==1.10.6
lazr.restfulclient==0.13.5
lazr.uri==1.0.3
louis==3.5.0
macaroonbakery==1.1.3
Mako==1.0.7
MarkupSafe==1.1.1
matplotlib==3.0.3
mistune==0.8.4
nbconvert==5.4.1
nbformat==4.4.0
netifaces==0.10.4
nltk==3.4
notebook==5.7.4
numpy==1.16.2
oauth==1.0.1
olefile==0.45.1
pandocfilters==1.4.2
parso==0.3.4
pexpect==4.6.0
pickleshare==0.7.5
Pillow==5.1.0
pipreqs==0.4.9
praw==6.1.1
prawcore==1.0.1
prometheus-client==0.6.0
prompt-toolkit==2.0.9
protobuf==3.0.0
ptyprocess==0.6.0
pycairo==1.16.2
pycrypto==2.6.1
pycups==1.9.73
Pygments==2.3.1
pygobject==3.26.1
pymacaroons==0.13.0
PyNaCl==1.1.2
pyparsing==2.3.1
pyRFC3339==1.0
pyrsistent==0.14.11
python-apt==1.6.3+ubuntu1
python-dateutil==2.8.0
python-debian==0.1.32
pytz==2018.3
pyxdg==0.25
PyYAML==3.12
pyzmq==18.0.0
qtconsole==4.4.3
reportlab==3.4.0
requests==2.21.0
requests-unixsocket==0.1.5
scour==0.36
SecretStorage==2.3.1
Send2Trash==1.5.0
simplejson==3.13.2
singledispatch==3.4.0.3
six==1.12.0
system-service==0.3
systemd-python==234
terminado==0.8.1
testpath==0.4.2
textblob==0.15.3
tornado==6.0.1
traitlets==4.3.2
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
update-checker==0.16
urllib3==1.24.1
usb-creator==0.3.3
virtualenv==16.4.3
wadllib==1.3.2
wcwidth==0.1.7
webencodings==0.5.1
websocket-client==0.55.0
Werkzeug==0.14.1
widgetsnbextension==3.4.2
xkit==0.0.0
yagmail==0.11.214
yarg==0.1.9
zope.interface==4.3.2

最佳答案

此打印适用于您在正在使用的 Python 版本中安装的所有软件包。正确的方法是使用 virtualenv,仅使用项目真正需要的包。

关于python - pip3requirements.txt 充满垃圾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55222637/

相关文章:

Python 日志记录适用于 Windows,但不适用于 Mac OS

python - 给定分隔符,生成字符串中子字符串长度列表的最快方法是什么?

python - 从 builtin_function_or_method 检索 func_code

linux - 如何在 Gambas Qt 应用程序上设置开关按钮的初始值?

python - Ubuntu 安装 Boto 错误

python - Cloud Vision API 客户端抛出操作系统错误 "too many open files"

python - Openerp 中 .rml 报告中的文字换行

linux - 将接口(interface)名称获取到 linux shell 脚本变量中

linux - 为什么需要硬链接(hard link)和软链接(soft link)?

python - 获取在 ubuntu 上运行 python 的无效语法