How to "reset" Python on Ubuntu 16.04 LTS

Asked

Viewed 265 times

0

I’m having trouble in a Python library on my computer, I can’t uninstall it through Pip. I wonder if there is any way to remove the "force" library or restore Python to default configuration.

Below follows the error while trying to uninstall through Pip:

rafamttz@rafamttz:~/python2713/bin$ Pip Uninstall Crossbar Uninstalling crossbar-17.12.1: /home/rafamttz/python2713/COPYRIGHT /home/rafamttz/python2713/LICENSE /home/rafamttz/python2713/LICENSE-FOR-API /home/rafamttz/python2713/bin/Crossbar /home/rafamttz/python2713/lib/python2.7/site-Packages/Crossbar-17.12.1.dist-info/DESCRIPTION.rst /home/rafamttz/python2713/lib/python2.7/site-Packages/Crossbar-17.12.1.dist-info/INSTALLER /home/rafamttz/python2713/lib/python2.7/site-Packages/Crossbar-17.12.1.dist-info/METADATA /home/rafamttz/python2713/lib/python2.7/site-Packages/Crossbar-17.12.1.dist-info/RECORD

...

Proceed (y/n)? y

Exception: Traceback (Most recent call last): File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/Commands/Uninstall.py", line 76, in run requirement_set.Uninstall(auto_confirm=options.yes) File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/req/req_set.py", line 346, in Uninstall req.Uninstall(auto_confirm=auto_confirm) File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/req/req_install.py", line 754, in Uninstall paths_to_remove.remove(auto_confirm) File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/home/rafamttz/python2713/lib/python2.7/site-Packages/Pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/home/rafamttz/python2713/lib/python2.7/shutil.py", line 303, in move os.unlink(src)

Error: [Errno 13] Permission denied: '/home/rafamttz/python2713/COPYRIGHT' You are using Pip version 9.0.1, However version 9.0.3 is available. You should consider upgrading via the 'Pip install --upgrade Pip' command.

I’m using Python 2.7.13.

1 answer

0


This installation is in your home directory but apparently you have taken some action with sudo and is the reason for the Pip can’t delete your files. Go to '/home/rafamttz/python2713/' and check the file permissions there.

  • Giovanni, I ended up reinstalling the OS, I backed up things, the problem has been solved

  • Tip, use virtualenv to create isolated pro Python environments, hence what you install is there in a specific location and it is still possible to test several versions of Python and modules easily.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.