pip install requests Permission denied
时间: 2023-10-16 11:28:11 浏览: 82
If you are getting a "Permission denied" error while trying to install requests package using pip, you might be facing a file permission issue.
To solve this, you can try running the pip command with administrative privileges. On Linux, you can use the sudo command to execute the pip command as a superuser. For example:
```
sudo pip install requests
```
On Windows, you can open the Command Prompt as an administrator and run the pip command. Right-click on the Command Prompt icon and select "Run as administrator". Then, execute the pip command:
```
pip install requests
```
If you still face the issue, you can try changing the permissions of the directory where the package is being installed. Make sure the user running the command has the necessary permissions to write to the directory.
阅读全文