简体   繁体   中英

Python packages installing error in deep-learning environment

When I am installing the new package in my deep-learning environment it gives me this error:

Could not install packages due to an EnvironmentError: [WinError 32] The process cannot access the file because it is being used by another process: Consider using the --user option or check the permissions.

Please help to resolve this

如果使用Windows并以管理员身份将第一个终端作为管理员,并在命令使用sudo之前使用ubuntu。

You are trying to install the package to a system folder which you don't have permissions to write to. You have three options(use only one of them):

1-setup a virtual env to install the package (recommended):

python3 -m venv env
source ./env/bin/activate 
then:
Install your package using python -m pip install <name_package>

2-Install the package to the user folder:

Install your package using:

` python -m pip install --user <name_package>

3-use sudo to install to the system folder (not recommended):

`sudo python -m pip install  <name_package>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM