0

So, i recently used sublime text for python code and i couldnt run code because i forgot to check mark the 'add to path' option, i thought to just reinstall python properly. But i have downloaded some libraries from pip will they also be removed completely if i delete/uninstall python?

surprisingly no one has asked this Q on stackoverflow as i didnt find any.

Also: i came across this link while searching for my question which was about packages/modules. Is there a difference between library/packages/modules? i thought the words were used interchangeably but the code syntax suggests otherwise?

mohsin khan
  • 3
  • 1
  • 5

1 Answers1

1

I don't know the answer, but here is a work-around:

Get all currently installed packages and store them in a file

pip freeze > current.txt

Then you can uninstall Python.

Next step would be to re-install Python, followed by re-installing your packages.

pip install -r current.txt

The packages would either be installed again, or a message will be raised stating the package is already installed (i.e. requirement already satisfied)

Matthias
  • 96
  • 4
  • i see. by the way i thought why not just uninstall and see what happens and after re-installing i used `pip list` and all the libraries i downloaded were there along with their requirement/dependent libraries too. is that how pip worked before, im not sure. i had installed(and re-installed) python 3.8.5, just so you know. – mohsin khan Dec 31 '20 at 14:18