Pip does not install packages: [Errno 13] Permission denied

0

I want to install packages for Python 3.6.5 When entering pip install pygame I get this:

C:\Users\rayvi>pip install shell
Collecting shell
  Using cached https://files.pythonhosted.org/packages/c1/19/5fc161e830b08bf2b419a04b0105f2dbf095759148d38cd1e99feadc4146/shell-1.0.1-py2.py3-none-any.whl
Installing collected packages: shell
Exception:
Traceback (most recent call last):
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip\wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'c:\program files 
(x86)\microsoft visual studio\shared\python36_64\Lib\site- 
packages\shell.py'
    
asked by Rainerio Amezquita Sanchez 27.04.2018 в 00:45
source

2 answers

2

Solution 1

On Windows, you should run pip using the python executable that should have access to the folder where pip is installed.

python -m pip install shell

To be able to do this, python has to be configured in your PATH.

Solution 2

Give more access permissions to the folder. For this, in the File Manager , go to the folder where Python is installed; click with the right button, select Properties ; in the Security tab click on Edit ; search Name of groups or users , the item Users and click Modify and Script ; Accept the two boxes. Now your user should be able to use pip without problems.

Solution 3

If that is not the case, you can also use the System Symbol as Administrator . To do this, look for System Symbol in the Start Menu and click the right button and click on Run as administrator

This solution is not recommended because everything you install with Administrator permissions will then need the same permissions to use it.

Added solutions 2 and 3

    
answered by 27.04.2018 в 00:57
0

Locate in the root of where pip is "C: \ Python27 \ Scripts", Keep in mind that if another software had already used pyton it would preferably be found in esat carpta. from the cmd console, starting with super administrator privileges "Run as administrator" and going to the path cd .. to regeresar and cd folder name to address until pip and executing it again will install it.

    
answered by 27.04.2018 в 02:49