0

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.

1 Answers1

0

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>
BeeFriedman
  • 1,800
  • 1
  • 11
  • 29
  • You might also want to look [here](https://stackoverflow.com/questions/11248073) They claim that uninstalling python doesn't really work so maybe try that. Unfortunately i can't try it on my own PC cause i don't want to uninstall all my stuff:) so i don't know which one works. – BeeFriedman Oct 14 '20 at 00:32
  • I deleted all Python related entries from my PATH, and reinstalling. I made a venv, pip installed Jupyter lab, and started Jupyter Lab. It is still is trying to load a module/extension, that as far as I understand it shouldn't know exists: jupyterlab_code_formatter. – PhasorLaser Oct 14 '20 at 00:49
  • ok, so look in to the link i added in the comment it has a post that shows how to erase all pip dependencies. – BeeFriedman Oct 14 '20 at 00:54
  • No it didn't. For some reason JupyterLab is extremely slow and freezes frequently (pressing CTRL+C or CTRL+F would freeze it immediately). That is if it even loads a notebook. Also I have deleted everything I can find for JupyterLab extensions, but I still see it throwing errors loading an extension (npm package) that I have removed. – PhasorLaser Oct 14 '20 at 15:57
  • Maybe try updating JupyterLab or uninstalling and reinstalling it. – BeeFriedman Oct 14 '20 at 16:29
  • I updated my answer according to the question hope it helps you. – BeeFriedman Oct 15 '20 at 23:33
  • 1
    Thank you CForce99, I believe my description was all a red herring. I believe the actual problem was the large amount of cell outputs saved within the notebook making the interface untenably slow. The contents of the markdown and code cells is in the 50kB range, but with the cell outputs I was at 65MB, which appears to be very difficult for Jupyter to deal with. I need to get work done, so am not going to test my other environments at this point to confirm until later. Best, – PhasorLaser Oct 16 '20 at 16:24