Trying to update conda on windows

0 views
Skip to first unread message

Sachin Shanbhag

unread,
Oct 30, 2016, 1:25:29 AM10/30/16
to conda - Public
Hi -  I am new to conda. Running a Windows 10 Home env with admin rights. when I try "conda update conda" I see two packages need to be updated... but I dont have write permissions - this is the message I get. 

The following NEW packages will be INSTALLED:

    conda-env: 2.6.0-0      (copy)

The following packages will be UPDATED:

    conda:     4.2.9-py35_0 --> 4.2.11-py35_0 (copy)

CondaIOError: IO error: Missing write permissions in: C:\Program Files\Anaconda3     <=== I have admin rights
#
# You don't appear to have the necessary permissions to update packages
# into the install area 'C:\Program Files\Anaconda3'.
# However you can clone this environment into your home directory and
# then make changes to it.
# This may be done using the command:
#
# $ conda create -n my_root --clone=C:\Program Files\Anaconda3      <=== Tried this - see following - 


==============================================

C:\Windows\system32>conda create -n C:\Users\USER\.anaconda -clone=C:\Program Files\Anaconda3
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:




Current conda install:

               platform : win-64
          conda version : 4.2.9
       conda is private : False
      conda-env version : 4.2.9
    conda-build version : 2.0.2
         python version : 3.5.2.final.0
       requests version : 2.11.1
       root environment : C:\Program Files\Anaconda3  (read only)
    default environment : C:\Program Files\Anaconda3
       envs directories : C:\Users\USER\.conda\envs
                          C:\Program Files\Anaconda3\envs
          package cache : C:\Users\USER\.conda\envs\.pkgs
                          C:\Program Files\Anaconda3\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                          https://repo.continuum.io/pkgs/free/noarch/
                          https://repo.continuum.io/pkgs/pro/win-64/
                          https://repo.continuum.io/pkgs/pro/noarch/
                          https://repo.continuum.io/pkgs/msys2/win-64/
                          https://repo.continuum.io/pkgs/msys2/noarch/
            config file : None
           offline mode : False



`$ C:\Program Files\Anaconda3\Scripts\conda-script.py create -n C:\Users\USER\.anaconda -clone=C:\Program Files\Anaconda3`




    Traceback (most recent call last):
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\exceptions.py", line 473, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\main.py", line 144, in _main
        exit_code = args.func(args, p)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 68, in execute
        install(args, parser, 'create')
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\install.py", line 238, in install
        prefix=prefix)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\api.py", line 23, in get_index
        channel_urls = prioritize_channels(channel_urls)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\models\channel.py", line 198, in prioritize_channels
        channel = Channel(chn)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\models\channel.py", line 46, in __call__
        elif has_scheme(value):
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\models\channel.py", line 28, in has_scheme
        return bool(urlparse(value).scheme in RECOGNIZED_URL_SCHEMES)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\common\url.py", line 51, in urlparse
        return parse_url(url)
      File "C:\Program Files\Anaconda3\lib\site-packages\requests\packages\urllib3\util\url.py", line 189, in parse_url
        raise LocationParseError(url)
    requests.packages.urllib3.exceptions.LocationParseError: Failed to parse: lone=C:\Program
                                                             ^^^
                                                                                                                                     The python script does not recognize clone even though the message asks me to ??? 

I tried several variations of the directory string ... also tried clone help. but to no avail. 
Any ideas ?


Kale

unread,
Oct 30, 2016, 9:53:48 AM10/30/16
to conda - Public
Can you try the clone again making sure you use two dashes `--` before the clone flag?

create -n C:\Users\USER\.anaconda --clone=C:\Program Files\Anaconda3

Still looks like there might be a bug somewhere, even if that works.

Sachin Shanbhag

unread,
Oct 30, 2016, 11:59:35 AM10/30/16
to conda - Public
Thanks Kale.. good point on the "--" . But now it hangs up elsewhere...  (relevant lines highlighted
I check: I have admin rights so there is no reason this lock should apply. Will probably consider entering a bug.


Few things.. 
  • For most part - python works.. I tried 3.5 yesterday and it works just fine for me.. its just this conda update. Am using it with pycharm
  • I have not tried updating any python packages. If it fails to update/install python packages(or other python modules), should I use 'pip'  ? Any experience using pip in conjunction with conda ? 
  • if I have to install some other python apps, should I use conda or should I installthem standalone given these issues. 
I am not abandoning conda, but I want to proceed with my developmental tasks in parallel while I fix these issues. 

========================================================================================================================
conda create -n C:\Users\USER\.anaconda --clone="C:\Program Files\Anaconda3"
Source:      C:\Program Files\Anaconda3
Destination: C:\Users\USER\.anaconda
The following packages cannot be cloned out of the root environment:
 - conda-build-2.0.2-py35_0
 - conda-4.2.9-py35_0
Packages: 173
Files: 39
WARNING conda.lock:touch(53): Failed to create lock, do not run conda in parallel processes [errno 13]
`$ C:\Program Files\Anaconda3\Scripts\conda-script.py create -n C:\Users\USER\.anaconda --clone=C:\Program Files\Anaconda3`




    Traceback (most recent call last):
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\exceptions.py", line 473, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\main.py", line 144, in _main
        exit_code = args.func(args, p)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 68, in execute
        install(args, parser, 'create')
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\install.py", line 228, in install
        clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\cli\install.py", line 90, in clone
        index_args=index_args)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\misc.py", line 387, in clone_env
        force_extract=False, index_args=index_args)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\misc.py", line 187, in explicit
        execute_actions(actions, index=index, verbose=verbose)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\instructions.py", line 134, in execute_instructions
        cmd(state, arg)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\instructions.py", line 58, in EXTRACT_CMD
        extract(arg)
      File "C:\Program Files\Anaconda3\lib\site-packages\conda\install.py", line 801, in extract
        t.extractall(path=temp_path)
      File "C:\Program Files\Anaconda3\lib\tarfile.py", line 1996, in extractall
        numeric_owner=numeric_owner)
      File "C:\Program Files\Anaconda3\lib\tarfile.py", line 2038, in extract
        numeric_owner=numeric_owner)
      File "C:\Program Files\Anaconda3\lib\tarfile.py", line 2100, in _extract_member
        os.makedirs(upperdirs)
      File "C:\Program Files\Anaconda3\lib\os.py", line 231, in makedirs
        makedirs(head, mode, exist_ok)
      File "C:\Program Files\Anaconda3\lib\os.py", line 231, in makedirs
        makedirs(head, mode, exist_ok)
      File "C:\Program Files\Anaconda3\lib\os.py", line 241, in makedirs
        mkdir(name, mode)
    PermissionError: [WinError 5] Access is denied: 'C:\\Program Files\\Anaconda3\\pkgs\\menuinst-1.4.1-py35_0.tmp'

Paul Hobson

unread,
Oct 30, 2016, 5:26:45 PM10/30/16
to Sachin Shanbhag, conda - Public
Are you executing the update command from within pycharm? If so, maybe pycharm doesn't have the permissions and you should try a plain ol' system terminal.

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/9fa4cff9-2599-4ff7-93b8-dd18c594af48%40continuum.io.

Kristof

unread,
Nov 7, 2016, 4:29:59 AM11/7/16
to conda - Public
I got the same message using the terminal. Everything was fine when the terminal is run as administrator.

Lasang Tamang

unread,
Dec 19, 2016, 3:09:38 PM12/19/16
to conda - Public, srsha...@gmail.com
I had the same issues. I run the terminal as administrator and then it worked for me.


On Sunday, October 30, 2016 at 12:25:29 AM UTC-5, Sachin Shanbhag wrote:

Sachin Shanbhag

unread,
Jan 17, 2017, 8:53:25 PM1/17/17
to conda - Public, srsha...@gmail.com


Solution for Conda IO Error - Run Conda Prompt as Administrator. This is not the usual windows cmd prompt. You'll find this prompt in the Anaconda group of programs along with the Conda Navigator. Right click on the prompt and click Run as Administrator. 

I was having trouble installing Seaborn - but once I  i tried the above, it works fine. 

Jose Rey

unread,
Feb 2, 2017, 9:48:29 PM2/2/17
to conda - Public, srsha...@gmail.com
This solution worked.  In the Applications Menu (Windows), find the "Anaconda Prompt" shortcut,  Right click, then "More>" and finally "Run as Administrator"... within the command prompt that opened, I used "conda update conda" and it worked.  Thanks
Message has been deleted

Sandor Szabo

unread,
Aug 22, 2017, 12:14:06 PM8/22/17
to conda - Public, srsha...@gmail.com
This is the solution. 
Many thanks :-) 

Mumtaz Gohar

unread,
Jan 19, 2018, 6:27:11 AM1/19/18
to conda - Public


On Wednesday, 18 January 2017 06:53:25 UTC+5, Sachin Shanbhag wrote:

Its so simple, follow these steps, 1:Go to the C and Right Click on  program files 2:Then click on properties 3:and then click on security and allow full control to the user.

PRAVEEN KUMAR

unread,
Feb 10, 2018, 1:50:28 PM2/10/18
to conda - Public, srsha...@gmail.com
Excellent. This worked fine also to me. Only change is run the Anaconda prompt as Administrator and below commands for installing the xgboost package in anaconda in Windows 8 for python:

anaconda search -t conda xgboost

conda install -c mndrake xgboost
Reply all
Reply to author
Forward
0 new messages