如何重新安装Python和Jupyter Lab? [英] How can I do a fresh installation of Python and Jupyter Lab?

查看:439
本文介绍了如何重新安装Python和Jupyter Lab?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用venv创建与Jupyter Lab合作的虚拟环境.我尝试了Anaconda一段时间,但无法使小部件正常工作.我回到了一个点,venv设置,一切正常.然后,在一段时间未使用设置后,当我按CTRL + F查找正在使用变量的位置时,Jupyter Lab冻结了.即使在重新启动内核之后,甚至在停用和重新激活环境之后,它也继续冻结.环境所在的文件夹不允许我删除它.从头开始创建新环境并不能解决问题.重新安装Python并创建一个新环境并没有解决它.我看到Pip缓存了很多软件包,因此在重新安装Python之后会从缓存的事件中提取安装内容.

I have been using venv to create virtual environments to work with Jupyter Lab. I tried Anaconda for awhile, but couldn't get the widgets working. I went back to a pip,venv setup and everything worked. Then after not using the setup for awhile, Jupyter Lab was freezing when I pressed CTRL+F to find where a variable was being used. It proceeded to freeze even after restarting the kernel, even after deactivating and reactivating the environment. The folder the environment was in won't let me delete it. Creating a new environment to start from scratch didn't fix it. Reinstalling Python and creating a new environment didn't fix it. I see that Pip has cached a lot of the packages and so installing things are pulled from the cached, event after reinstalling Python.

我想删除与先前安装相关的所有内容并重新开始,但是这样做很麻烦.任何建议都会有所帮助.

I want to remove everything related to the previous installation and start fresh, but am having trouble doing that. Any advice would be helpful.

Windows 10 Python 3.8.5是使用的最新版本.

Windows 10 Python 3.8.5 is the most recent version used.

推荐答案

使用pip list列出所有软件包(从旧python中要卸载的软件包).然后复制所有软件包,并将其放入安装了所有软件包的--requirement文件中. (如何指定--requirement文件)然后使用以下命令卸载所有旧软件包.

Use pip list to list all package (from the old python the one you want to uninstall). Then copy all the packages and put the in a --requirement file with all the packages installed in it. (how to specify --requirement file) Then use the following command to uninstall all the old packages.

pip uninstall [options] -r <requirements file>

这篇关于如何重新安装Python和Jupyter Lab?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆