Changing ownership of libraries installed on python virtual environment

Issue

I created a python virtual environment using root user and installed 9 python libraries on the virtual environment using the same user. The root access has been revoked now and am unable to access libraries using my own userid (that is not root).

How can we change the permission of the libraries so that my userid can access them?

Solution

You can fix the issue by changing UNIX file permissions pack to your user. Try:

$ sudo chown -R USERNAME /Users/USERNAME/Library/Logs/pip
$ sudo chown -R USERNAME /Users/USERNAME/Library/Caches/pip

then pip should be able to write those files again.

Source

Answered By – Lukas Juskevicius

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published