Project scenario:
In the virtual environment created with virtualenv, use pip install to install the whl package, and there is a problem of insufficient permissions
First of all, it is taken for granted that it is good to add it in front sudo pip……
, but the warning prompts that something is wrong, so the installed package is not installed in the virtual environment!
Instead, it is installed in a normal environment outside
, so sudo cannot be used and permissions are required. Searching the Internet says to add –user, and it can be used, pip --user……
but this command cannot be used in the virtual environment, and an error will be reported.ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
solution:
Directly give 777 permissions to the entire folder where the virtual environment is located, it can be solved,
chmod 777 虚拟环境文件夹/ -R
and then you can install it smoothly!
Reference (thanks):
pycharm has insufficient permissions to create a virtual environment ERROR: Could not install packages due to an EnvironmentError: [Errno 13]
end