Reputation: 91
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 is the most recent version used.
Upvotes: 0
Views: 547
Reputation: 1974
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>
Upvotes: 0