Tag Archives: permissionerror

pip install – PermissionError: [Errno 13] Permission denied

This error occurs when you run Anaconda and install SkLearn:

Windows 10 Python 3.6.0 Anaconda
The errors are as follows:

Exception:
Traceback (most recent call last):
  File "d:\anaconda3\lib\site-packages\pip\basecommand.py", line 209, in main
    status = self.run(options, args)
  File "d:\anaconda3\lib\site-packages\pip\commands\install.py", line 317, in run
    prefix=options.prefix_path,
  File "d:\anaconda3\lib\site-packages\pip\req\req_set.py", line 732, in install
    **kwargs
  File "d:\anaconda3\lib\site-packages\pip\req\req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "d:\anaconda3\lib\site-packages\pip\req\req_install.py", line 1030, in move_wheel_files
    isolated=self.isolated,
  File "d:\anaconda3\lib\site-packages\pip\wheel.py", line 344, in move_wheel_files
    clobber(source, lib_dir, True)
  File "d:\anaconda3\lib\site-packages\pip\wheel.py", line 322, in clobber
    shutil.copyfile(srcfile, destfile)
  File "d:\anaconda3\lib\shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'd:\\anaconda3\\Lib\\site-packages\\sklearn\\utils\\m
urmurhash.cp35-win_amd64.pyd'

Solution: Run as an administrator: Anaconda Prompt

A new problem arose after the problem was resolved, and when I tried to create a new Python,
Conda create –name py36 python=3.6
Error started again:

CondaHTTPError: HTTP None Nonefor url <None>

An HTTP error occurred when trying to retrieve this URL.
ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'repo.continuum.io\', p
ort=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Ca
used by ReadTimeoutError("HTTPSConnectionPool(host=\'repo.continuum.io\', port=4
43): Read timed out. (read timeout=6.1)",))',),)

The cause of the error may be a problem with the domestic network connecting to foreign libraries, which may occur with the emergence of some major events.

The change method is to use the image of Tsinghua University as the default library to update, and write the following code under Prompt:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

Then look at the configuration information using the conda config –show statement and you will find:

There’s an extra default.
Then update the package and it will be quick.

Postscript:
If the second question is still wrong after the first two, check out your firewall Settings.
Try closing the firewall.

Refer to the article: http://www.jianshu.com/p/2f3be7781451