PyCharm: Install Packages Failed

2019-04-19 16:39发布

问题:

I need some packages to be installed. No matter what direction I try, it only gets worse.

Please help.

40:497: execution error: The directory '/Users/doekewartena/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/doekewartena/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Could not find a version that satisfies the requirement path (from versions: ) No matching distribution found for path (1)

回答1:

Did you check file permissions pack for your user ?

You can run the below command to change the ownership of directory (/Users/doekewartena/Library/Caches/pip) to your current user (doekewartena) :

$ sudo chown -R doekewartena /Users/doekewartena/Library/Caches/pip


回答2:

pip install --user <package-name> worked for me.

Sudo not required.