New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create ( add ) Anaconda menus (to the system PATH) #732

Closed
IkiAlex opened this Issue Apr 1, 2016 · 72 comments

Comments

Projects
None yet
@IkiAlex

IkiAlex commented Apr 1, 2016

Hey there!
If somebody can help me i'd be very thankful, cause i cant solve this by myself. As i see there is pretty odd issue, and i cant find a solution cause nothing works for me.
I have very new virtual pc ( win xp 64 ) and i'm trying to install anaconda/ miniconda. No matter. So i got 2 errors i *_have *_to ignore :
Failed to create Anaconda menus
Failed to add Anaconda to the system PATH

Ofcourse , if i just ignore this - nothing works. Cant launch even conda :
Failed to create process
Just cant understand why it doesn't work for me. I've installed anaconda on 4 different pc ( all win xp 64 ) And sometime it works, sometime doesn't

Regards, ALex!


@IkiAlex IkiAlex changed the title from F to Failed to create ( add ) Anaconda menus (to the system PATH) Apr 1, 2016

@msarahan

This comment has been minimized.

Show comment
Hide comment
@msarahan

msarahan Apr 1, 2016

Member

There may be up to three things at play here:

  • if you have other versions of python installed and on PATH, the installer may erroneously try to use them to make menus, and will probably fail.
  • there was a race condition in the installer scripts that led to deletion of scripts before they finished installing. This fix has not yet been released in a miniconda installer.
  • our python 2 installers don't properly support non-ASCII characters right now. Python 3 installers should, but more recent ones do not support Windows XP.

I hope this helps you narrow it down. If you can isolate it, please let us know.

Member

msarahan commented Apr 1, 2016

There may be up to three things at play here:

  • if you have other versions of python installed and on PATH, the installer may erroneously try to use them to make menus, and will probably fail.
  • there was a race condition in the installer scripts that led to deletion of scripts before they finished installing. This fix has not yet been released in a miniconda installer.
  • our python 2 installers don't properly support non-ASCII characters right now. Python 3 installers should, but more recent ones do not support Windows XP.

I hope this helps you narrow it down. If you can isolate it, please let us know.

@IkiAlex

This comment has been minimized.

Show comment
Hide comment
@IkiAlex

IkiAlex Apr 1, 2016

ty for fast reply.

  1. I thought about it. That's why i've installed "clean" ver of win xp as virtual machine
    2.I also tried to install anaconda instead miniconda and received the same error. I only work with mini right now,cause it's faster to test (30 vs 300 Mb)
  2. I have to use python2. I can't see any non-ASCII chars in any path. Maybe there is some kind of trick i should use to avoid this error with changing some registry key.

IkiAlex commented Apr 1, 2016

ty for fast reply.

  1. I thought about it. That's why i've installed "clean" ver of win xp as virtual machine
    2.I also tried to install anaconda instead miniconda and received the same error. I only work with mini right now,cause it's faster to test (30 vs 300 Mb)
  2. I have to use python2. I can't see any non-ASCII chars in any path. Maybe there is some kind of trick i should use to avoid this error with changing some registry key.
@msarahan

This comment has been minimized.

Show comment
Hide comment
@msarahan

msarahan Apr 1, 2016

Member

what locale is the system set to? Do you have any way of sharing the VM with us so we can study this more closely? Our main issue in studying this problem has been inability to reproduce it.

Member

msarahan commented Apr 1, 2016

what locale is the system set to? Do you have any way of sharing the VM with us so we can study this more closely? Our main issue in studying this problem has been inability to reproduce it.

@IkiAlex

This comment has been minimized.

Show comment
Hide comment
@IkiAlex

IkiAlex Apr 4, 2016

sry fo long no-respond .This is exactly what i'm using right now:
https://yadi.sk/d/nnHEzl0WBCumY

IkiAlex commented Apr 4, 2016

sry fo long no-respond .This is exactly what i'm using right now:
https://yadi.sk/d/nnHEzl0WBCumY

@IkiAlex

This comment has been minimized.

Show comment
Hide comment
@IkiAlex

IkiAlex Apr 6, 2016

Well.... I have nothing to say. Now it works on my vm (2 d ago didnt, now does! ) I did nothing.
And still i cant install it to my work pc ( where i need this )
I just dont know whats going on ...

IkiAlex commented Apr 6, 2016

Well.... I have nothing to say. Now it works on my vm (2 d ago didnt, now does! ) I did nothing.
And still i cant install it to my work pc ( where i need this )
I just dont know whats going on ...

@msarahan

This comment has been minimized.

Show comment
Hide comment
@msarahan

msarahan Apr 6, 2016

Member

It sounds like our race condition is still alive and well. I will try to investigate.

Even when that part of the installer fails, you should be able to use the installed python, though. Open a prompt in the folder where you installed it, and run python from there. Does it work? If not, any error would be helpful to understand why the installer might be failing. If it works and you just want to run with it, you can manually modify PATH and install shortcuts. Let me know if the installed python works, and I'll point you to directions.

Member

msarahan commented Apr 6, 2016

It sounds like our race condition is still alive and well. I will try to investigate.

Even when that part of the installer fails, you should be able to use the installed python, though. Open a prompt in the folder where you installed it, and run python from there. Does it work? If not, any error would be helpful to understand why the installer might be failing. If it works and you just want to run with it, you can manually modify PATH and install shortcuts. Let me know if the installed python works, and I'll point you to directions.

@IkiAlex

This comment has been minimized.

Show comment
Hide comment
@IkiAlex

IkiAlex Apr 8, 2016

Ty for your time,I appreciate You still trying to help. Sry for long no-respond sometimes.
Well, quote : ".. If it works"
I wish...it would be to easy. But it doesn't
"Could not execute specified program" , when i'm trying to run c:\Miniconda2\python.exe
"the application was not running because it is incorrectly configured. Re-installing the application may fix this problem" if i 'm trying to execute python.exe at folder (by double clicking) .
"Failed to create process" when i'm trying to run ..\conda.exe

IkiAlex commented Apr 8, 2016

Ty for your time,I appreciate You still trying to help. Sry for long no-respond sometimes.
Well, quote : ".. If it works"
I wish...it would be to easy. But it doesn't
"Could not execute specified program" , when i'm trying to run c:\Miniconda2\python.exe
"the application was not running because it is incorrectly configured. Re-installing the application may fix this problem" if i 'm trying to execute python.exe at folder (by double clicking) .
"Failed to create process" when i'm trying to run ..\conda.exe

@IkiAlex

This comment has been minimized.

Show comment
Hide comment
@IkiAlex

IkiAlex Apr 8, 2016

Well . Seems like i've found the solution. Unfortunately I can't test it now , cause I haven't access for all machines right now , but it works at local pc ( same as others)
The solution was to easy. i only had to install (vcredist_x64.exe , Microsoft Visual C++ 2008 Redistributable Setup ) I'll reply next week does it rly fixes the problem, but guess so

IkiAlex commented Apr 8, 2016

Well . Seems like i've found the solution. Unfortunately I can't test it now , cause I haven't access for all machines right now , but it works at local pc ( same as others)
The solution was to easy. i only had to install (vcredist_x64.exe , Microsoft Visual C++ 2008 Redistributable Setup ) I'll reply next week does it rly fixes the problem, but guess so

@g4u55i4n

This comment has been minimized.

Show comment
Hide comment
@g4u55i4n

g4u55i4n May 25, 2016

Hi Mike, thank you and sorry for that - sounds like incompetence to me

g4u55i4n commented May 25, 2016

Hi Mike, thank you and sorry for that - sounds like incompetence to me

@develmusa

This comment has been minimized.

Show comment
Hide comment
@develmusa

develmusa Sep 9, 2016

I had the same problem.
Solution: Execute the "addpath", "mkdirs", and "mkmenus" for the cmd with admin rights.

bsp

Without admin permission this error shows up

prob
("Zugriff verweigert" means permission denied)

Here my install log log.txt

develmusa commented Sep 9, 2016

I had the same problem.
Solution: Execute the "addpath", "mkdirs", and "mkmenus" for the cmd with admin rights.

bsp

Without admin permission this error shows up

prob
("Zugriff verweigert" means permission denied)

Here my install log log.txt

@jcmorris-mts

This comment has been minimized.

Show comment
Hide comment
@jcmorris-mts

jcmorris-mts Sep 17, 2016

Just to make SeppDeDepp's answer a bit more convenient...

  1. Save the code below as a batch file in <ANACONDA_HOME> where your python is located.
  2. Run it as an admin. Works a treat!

Assuming <ANACONDA_HOME> = "C:\Anaconda3"

REM Fix.bat
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" addpath
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" mkdirs
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" mkmenus

jcmorris-mts commented Sep 17, 2016

Just to make SeppDeDepp's answer a bit more convenient...

  1. Save the code below as a batch file in <ANACONDA_HOME> where your python is located.
  2. Run it as an admin. Works a treat!

Assuming <ANACONDA_HOME> = "C:\Anaconda3"

REM Fix.bat
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" addpath
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" mkdirs
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib\_nsis.py" mkmenus
@eunseoplee90

This comment has been minimized.

Show comment
Hide comment
@eunseoplee90

eunseoplee90 Sep 22, 2016

Hi~

I am trying to install minianaconda, but I cant.
When installing, I had the same problem, and following above method.
Until 'addpath' and 'mkdirs' are worked well, but at entering mkmenus, I have some problem like this.
image
image

(I run 'cmd' as admin.)

Please help me :(

eunseoplee90 commented Sep 22, 2016

Hi~

I am trying to install minianaconda, but I cant.
When installing, I had the same problem, and following above method.
Until 'addpath' and 'mkdirs' are worked well, but at entering mkmenus, I have some problem like this.
image
image

(I run 'cmd' as admin.)

Please help me :(

@prithvikg

This comment has been minimized.

Show comment
Hide comment
@prithvikg

prithvikg Sep 24, 2016

Did some research and found out it was because my path variable was too long. Windows apparently has a limit of 1024 for path length. so i cleared some variables and reinstalled and it seemed to work fine

prithvikg commented Sep 24, 2016

Did some research and found out it was because my path variable was too long. Windows apparently has a limit of 1024 for path length. so i cleared some variables and reinstalled and it seemed to work fine

@luishang

This comment has been minimized.

Show comment
Hide comment
@luishang

luishang Sep 26, 2016

Same problem here. 'addpath' and 'mkdirs' worked well, but mkmenus, didn't. I'm also running in cmd as an administrator and the length of my path is shot: c:\Anaconda

luishang commented Sep 26, 2016

Same problem here. 'addpath' and 'mkdirs' worked well, but mkmenus, didn't. I'm also running in cmd as an administrator and the length of my path is shot: c:\Anaconda

@BillDineen

This comment has been minimized.

Show comment
Hide comment
@BillDineen

BillDineen Nov 9, 2016

I have a new laptop with win 10 64 and have the exact same issue on first installation attempt. Any suggestions?

BillDineen commented Nov 9, 2016

I have a new laptop with win 10 64 and have the exact same issue on first installation attempt. Any suggestions?

@eunseoplee90

This comment has been minimized.

Show comment
Hide comment
@eunseoplee90

eunseoplee90 Nov 10, 2016

Hi~

I have solved this problem.

In my case, English is not my native language, so when I install windows 10 in my computer, I type my name as Korean.

This cause the problem like this.

Thus, I change my name into one as English, It works well.

eunseoplee90 commented Nov 10, 2016

Hi~

I have solved this problem.

In my case, English is not my native language, so when I install windows 10 in my computer, I type my name as Korean.

This cause the problem like this.

Thus, I change my name into one as English, It works well.

@caioproiete

This comment has been minimized.

Show comment
Hide comment
@caioproiete

caioproiete Nov 22, 2016

I've just had the same issue on a Windows 10 machine (Anaconda2-4.2.0-Windows-x86_64.exe). No special characters in my name or path, no blank spaces either, my user is admin on the machine, and UAC is turned off.

Running addpath, mkdirs, and mkmenus from an elevated prompt didn't work either.

The only way I could make it work, was running the installer as Administrator, and installing it for All Users.

caioproiete commented Nov 22, 2016

I've just had the same issue on a Windows 10 machine (Anaconda2-4.2.0-Windows-x86_64.exe). No special characters in my name or path, no blank spaces either, my user is admin on the machine, and UAC is turned off.

Running addpath, mkdirs, and mkmenus from an elevated prompt didn't work either.

The only way I could make it work, was running the installer as Administrator, and installing it for All Users.

@rTfact

This comment has been minimized.

Show comment
Hide comment
@rTfact

rTfact Dec 1, 2016

Had the same problem on Windows 8.1 Enterprise.
Tried the fix-script, but it didn't fix things.
My path is not very long: approx 163 chars. Std. ascii username.
Anaconda3 4.2.0 (64-bit).
Installing for All as Admin worked.

rTfact commented Dec 1, 2016

Had the same problem on Windows 8.1 Enterprise.
Tried the fix-script, but it didn't fix things.
My path is not very long: approx 163 chars. Std. ascii username.
Anaconda3 4.2.0 (64-bit).
Installing for All as Admin worked.

@MarkusFK

This comment has been minimized.

Show comment
Hide comment
@MarkusFK

MarkusFK Dec 3, 2016

I tried the same that @caioproite sugested on my Win 10 (64 bit system) with (Anaconda2-4.2.0-Windows-x86_64.exe), run it as admin installing for all users. And it didn't work. Got following message:
anaconda error_4

Can anybody help me? thanks.

MarkusFK commented Dec 3, 2016

I tried the same that @caioproite sugested on my Win 10 (64 bit system) with (Anaconda2-4.2.0-Windows-x86_64.exe), run it as admin installing for all users. And it didn't work. Got following message:
anaconda error_4

Can anybody help me? thanks.

@TheBeege

This comment has been minimized.

Show comment
Hide comment
@TheBeege

TheBeege Dec 15, 2016

So if this is such an easily fixed problem, why isn't the Windows installer fixed?

Is there a repo for it? I'd be disappointed if there's not a PR already, but I'll create one if there isn't.

TheBeege commented Dec 15, 2016

So if this is such an easily fixed problem, why isn't the Windows installer fixed?

Is there a repo for it? I'd be disappointed if there's not a PR already, but I'll create one if there isn't.

@TheBeege

This comment has been minimized.

Show comment
Hide comment
@TheBeege

TheBeege Dec 15, 2016

@MarkusFK - I'm guessing you should be able to change line 172 in knownfolders.py to use path.decode('utf8') rather than whatever codec it's attempting to use. Why it's not designed to select the correct codec is beyond me.

TheBeege commented Dec 15, 2016

@MarkusFK - I'm guessing you should be able to change line 172 in knownfolders.py to use path.decode('utf8') rather than whatever codec it's attempting to use. Why it's not designed to select the correct codec is beyond me.

@msarahan

This comment has been minimized.

Show comment
Hide comment
@msarahan

msarahan Jan 9, 2017

Member

@TheBeege the code for this is menuinst. Specifically, https://github.com/ContinuumIO/menuinst/blob/master/menuinst/knownfolders.py#L168

It is trying to detect the right codec, but I might be totally wrong in how I do it. PRs welcome on menuinst.

We have also reworked the installers for the coming Anaconda 4.3 release to disallow unicode paths when installing a Python2 distribution, and to warn people about these paths with Python 3. Accented characters unfortunately just break a lot of Python 2 software, and we can't fix the entire ecosystem.

Member

msarahan commented Jan 9, 2017

@TheBeege the code for this is menuinst. Specifically, https://github.com/ContinuumIO/menuinst/blob/master/menuinst/knownfolders.py#L168

It is trying to detect the right codec, but I might be totally wrong in how I do it. PRs welcome on menuinst.

We have also reworked the installers for the coming Anaconda 4.3 release to disallow unicode paths when installing a Python2 distribution, and to warn people about these paths with Python 3. Accented characters unfortunately just break a lot of Python 2 software, and we can't fix the entire ecosystem.

@vaibhavgupta2205

This comment has been minimized.

Show comment
Hide comment
@vaibhavgupta2205

vaibhavgupta2205 Jan 9, 2017

Hi @msarahan,

I tried installing both the versions i.e 2.7 as well as 3.5 for 64 bit Windows OS. Got the following three issues in order as mentioned :-

  • Failed to create Anaconda menus
  • Failed to create Anaconda directories
  • Failed to add Anaconda to the system PATH
    Can you please help me out here by letting me know what steps exactly to follow as I am completely new to this,

vaibhavgupta2205 commented Jan 9, 2017

Hi @msarahan,

I tried installing both the versions i.e 2.7 as well as 3.5 for 64 bit Windows OS. Got the following three issues in order as mentioned :-

  • Failed to create Anaconda menus
  • Failed to create Anaconda directories
  • Failed to add Anaconda to the system PATH
    Can you please help me out here by letting me know what steps exactly to follow as I am completely new to this,
@Jang-neudern

This comment has been minimized.

Show comment
Hide comment
@Jang-neudern

Jang-neudern Jan 11, 2017

Finally installed.

  1. I'm a Korean and using non-ASCII user name. (in Korean, not English)
    -> creating new account for my window10, user name is in English.
  2. IntelliJ, blueJ, JDK were installed.
    I still do not understand relation, but they can affect path modification or something somehow (that's what I've searched)
    -> uninstall and delete paths (you can google how to)
  3. I'm not sure path variable was too long or short enough. -> just make new account name in one alphabet 'j'.
  4. vaccine : did not turn off
    anti-malware program : did turn off.
    (I still do not know causality, I just did -_- ;;)
  5. selected user only install

Thank you all!

Jang-neudern commented Jan 11, 2017

Finally installed.

  1. I'm a Korean and using non-ASCII user name. (in Korean, not English)
    -> creating new account for my window10, user name is in English.
  2. IntelliJ, blueJ, JDK were installed.
    I still do not understand relation, but they can affect path modification or something somehow (that's what I've searched)
    -> uninstall and delete paths (you can google how to)
  3. I'm not sure path variable was too long or short enough. -> just make new account name in one alphabet 'j'.
  4. vaccine : did not turn off
    anti-malware program : did turn off.
    (I still do not know causality, I just did -_- ;;)
  5. selected user only install

Thank you all!

@Jang-neudern

This comment has been minimized.

Show comment
Hide comment
@Jang-neudern

Jang-neudern Jan 11, 2017

I tested several times more,

My problem was just other pre-installed programs or their paths, I think.

without a new account, without a vaccine turned off, without some kinds of modifying the length of path variable, installed.

Jang-neudern commented Jan 11, 2017

I tested several times more,

My problem was just other pre-installed programs or their paths, I think.

without a new account, without a vaccine turned off, without some kinds of modifying the length of path variable, installed.

@rmundkowsky

This comment has been minimized.

Show comment
Hide comment
@rmundkowsky

rmundkowsky Feb 4, 2017

Had this problem with Miniconda (latest I think 4.3.0) and Anaconda 4.3.0 on Windows 8.1 (64 bit, default USA English). The failure happens near end of install of these apps, so do not try to install Anaconda, because it just takes longer to fail. Making your path short, installing as Admin, installing Visual Studio redist executables, and using 32 bit rather than 64 bit version does NOT help. The following does work:

  1. ****** UNINSTALL ALL PYTHON INSTALLATIONS, OTHERWISE THEY WILL GET MESSED UP AND YOU CANNOT CLEANLY UNINSTALL THEM WITHOUT WINDOWS RESTORE, or at least I think these two problems were related *****
  2. Install Miniconda
  3. As Admin open CMD and change to directory where Miniconda is installed
  4. pythonw.exe -E -s "Lib_nsis.py" addpath
  5. pythonw.exe -E -s "Lib_nsis.py" mkdirs
  6. pythonw.exe -E -s "Lib_nsis.py" mkmenus
  7. exit that CMD
  8. I then ran Anaconda prompt from start menu, but you likely can use CMD
    note) if you run "conda list", you will see no packages installed, but good news is conda will install pacakges, so:
  9. conda install numpy
    note) this will install conda! lol
  10. conda install anaconda

Now, I am not sure if environment is totally fixed, because if you run the following it fails, but likely a different bug:
modules('help')
But if you run some tests like following it seems to work
import numpy
numpy.test('full')

So Anaconda developers, please fix this.

rmundkowsky commented Feb 4, 2017

Had this problem with Miniconda (latest I think 4.3.0) and Anaconda 4.3.0 on Windows 8.1 (64 bit, default USA English). The failure happens near end of install of these apps, so do not try to install Anaconda, because it just takes longer to fail. Making your path short, installing as Admin, installing Visual Studio redist executables, and using 32 bit rather than 64 bit version does NOT help. The following does work:

  1. ****** UNINSTALL ALL PYTHON INSTALLATIONS, OTHERWISE THEY WILL GET MESSED UP AND YOU CANNOT CLEANLY UNINSTALL THEM WITHOUT WINDOWS RESTORE, or at least I think these two problems were related *****
  2. Install Miniconda
  3. As Admin open CMD and change to directory where Miniconda is installed
  4. pythonw.exe -E -s "Lib_nsis.py" addpath
  5. pythonw.exe -E -s "Lib_nsis.py" mkdirs
  6. pythonw.exe -E -s "Lib_nsis.py" mkmenus
  7. exit that CMD
  8. I then ran Anaconda prompt from start menu, but you likely can use CMD
    note) if you run "conda list", you will see no packages installed, but good news is conda will install pacakges, so:
  9. conda install numpy
    note) this will install conda! lol
  10. conda install anaconda

Now, I am not sure if environment is totally fixed, because if you run the following it fails, but likely a different bug:
modules('help')
But if you run some tests like following it seems to work
import numpy
numpy.test('full')

So Anaconda developers, please fix this.

@sayingu

This comment has been minimized.

Show comment
Hide comment
@sayingu

sayingu Feb 7, 2017

I had a same problem at this line

Creating Anaconda menus...
Execute: "C:\Users\sayin\Anaconda3\pythonw.exe" -E -s "C:\Users\sayin\Anaconda3\Lib_nsis.py" mkmenus

I deleted user variable Path C:\Program Files (x86)\Google\google_appengine\ and it's worked.

And I guess Miniconda don't have this issue.
Because I have installed no errors same settings at my home.

sayingu commented Feb 7, 2017

I had a same problem at this line

Creating Anaconda menus...
Execute: "C:\Users\sayin\Anaconda3\pythonw.exe" -E -s "C:\Users\sayin\Anaconda3\Lib_nsis.py" mkmenus

I deleted user variable Path C:\Program Files (x86)\Google\google_appengine\ and it's worked.

And I guess Miniconda don't have this issue.
Because I have installed no errors same settings at my home.

@11leven

This comment has been minimized.

Show comment
Hide comment
@11leven

11leven Mar 2, 2017

For win10 , Abort the installation when you see "Failed to create ( add ) Anaconda menus "

Restart the installation by right clicking the installation file and 'Run as Admin'.
Allow it to access by all users of the system.

11leven commented Mar 2, 2017

For win10 , Abort the installation when you see "Failed to create ( add ) Anaconda menus "

Restart the installation by right clicking the installation file and 'Run as Admin'.
Allow it to access by all users of the system.

@kswgit

This comment has been minimized.

Show comment
Hide comment
@kswgit

kswgit Jun 25, 2017

I got a same problem, and I deleted my 'erlang' environment variable and it work.

kswgit commented Jun 25, 2017

I got a same problem, and I deleted my 'erlang' environment variable and it work.

@solenovex

This comment has been minimized.

Show comment
Hide comment
@solenovex

solenovex Jul 4, 2017

I don't have java or jdk path in my environment, but I still got the same problem when installing.

Then I ignore the errors, I manually execute the command:
"C:\Users\solen\Anaconda3\pythonw.exe" -E -s "C:\Users\solen\Anaconda3\Lib_nsis.py" mkmenus"
and the command execution was successful, menus were created in the start menu, but when I open ipython or jupyter notebook, there is an error: "This application failed to start because it couldn't find or load the Qt platform plugin "windows" in ""."

And the I found the solution for me, I'm using windows with visual studio community 2017 installed, but I didn't install the C++ development module, then I check it and install the C++ development module, all the products in anaconda3 works, no more errors!!!!

solenovex commented Jul 4, 2017

I don't have java or jdk path in my environment, but I still got the same problem when installing.

Then I ignore the errors, I manually execute the command:
"C:\Users\solen\Anaconda3\pythonw.exe" -E -s "C:\Users\solen\Anaconda3\Lib_nsis.py" mkmenus"
and the command execution was successful, menus were created in the start menu, but when I open ipython or jupyter notebook, there is an error: "This application failed to start because it couldn't find or load the Qt platform plugin "windows" in ""."

And the I found the solution for me, I'm using windows with visual studio community 2017 installed, but I didn't install the C++ development module, then I check it and install the C++ development module, all the products in anaconda3 works, no more errors!!!!

@poleguy

This comment has been minimized.

Show comment
Hide comment
@poleguy

poleguy Jul 5, 2017

I had the same problem on Win 7. I looked in the install details and ran the command listed there directly from the cmd.exe shell manually and it worked:
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib_nsis.py" addpath 3.6.1 Anaconda3 4.4.0 64-bit

poleguy commented Jul 5, 2017

I had the same problem on Win 7. I looked in the install details and ran the command listed there directly from the cmd.exe shell manually and it worked:
"C:\Anaconda3\pythonw.exe" -E -s "C:\Anaconda3\Lib_nsis.py" addpath 3.6.1 Anaconda3 4.4.0 64-bit

@Kernalcorn82

This comment has been minimized.

Show comment
Hide comment
@Kernalcorn82

Kernalcorn82 Jul 14, 2017

Well! Seeing as this thread is still being looked at nowadays, I was having the whole no menus, path and such at the end of the installation. I uninstalled and reinstalled like a lunatic for a few days and thanks to this thread decided to run the installation in admin mode. By installing for all users it worked like a charm.
I was using windows 10, 64-bit OS, and anaconda3 4.4.0

Keep fighting the good fight brothers and sisters, you can solve this problem!

Kernalcorn82 commented Jul 14, 2017

Well! Seeing as this thread is still being looked at nowadays, I was having the whole no menus, path and such at the end of the installation. I uninstalled and reinstalled like a lunatic for a few days and thanks to this thread decided to run the installation in admin mode. By installing for all users it worked like a charm.
I was using windows 10, 64-bit OS, and anaconda3 4.4.0

Keep fighting the good fight brothers and sisters, you can solve this problem!

@tpjoe

This comment has been minimized.

Show comment
Hide comment
@tpjoe

tpjoe Jul 16, 2017

Had the same issue. Using Windows 7-64bit, and Anaconda3-4.4.0. Just solved this problem by deleting the variables in PATH so that the total PATH characters (space and semi colon included) from both "USER" and "SYSTEM" combined are below 1000. I also deleted all variables that have parentheses. Then install with admin.

tpjoe commented Jul 16, 2017

Had the same issue. Using Windows 7-64bit, and Anaconda3-4.4.0. Just solved this problem by deleting the variables in PATH so that the total PATH characters (space and semi colon included) from both "USER" and "SYSTEM" combined are below 1000. I also deleted all variables that have parentheses. Then install with admin.

@cjalvarado

This comment has been minimized.

Show comment
Hide comment
@cjalvarado

cjalvarado Jul 31, 2017

Whew! I'm running the same set up most describe (Windows 10 64-bit anaconda3 4.4.0) and getting the same error(s). After days of "uninstalling and reinstalling like a lunatic" (as @Kernalcorn82 describes) earlier this year, nothing (running as admin, stalling for Just me, installing for everyone, all of the fixes with the post-install scripts, etc) worked and I had given up. But today I finally went back to this thread and saw the new information about Java and the path, and lo and behold removing the Java entries, as well as those with parentheses, from my path and the system path worked! I also removed my CLASSPATH, for the record, even though I doubt that was it (but who knows...). Both installing for all and installing for just me (running as admin just in case) worked. So relieved to have a solution!

cjalvarado commented Jul 31, 2017

Whew! I'm running the same set up most describe (Windows 10 64-bit anaconda3 4.4.0) and getting the same error(s). After days of "uninstalling and reinstalling like a lunatic" (as @Kernalcorn82 describes) earlier this year, nothing (running as admin, stalling for Just me, installing for everyone, all of the fixes with the post-install scripts, etc) worked and I had given up. But today I finally went back to this thread and saw the new information about Java and the path, and lo and behold removing the Java entries, as well as those with parentheses, from my path and the system path worked! I also removed my CLASSPATH, for the record, even though I doubt that was it (but who knows...). Both installing for all and installing for just me (running as admin just in case) worked. So relieved to have a solution!

@javaSunson

This comment has been minimized.

Show comment
Hide comment
@javaSunson

javaSunson Aug 7, 2017

when I delete all of the path ,install stil error

javaSunson commented Aug 7, 2017

when I delete all of the path ,install stil error

@fcjdgmrvwm

This comment has been minimized.

Show comment
Hide comment
@fcjdgmrvwm

fcjdgmrvwm Sep 2, 2017

if u encounter this problem, UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4
please get into this path, usually, C:\ProgramData\Anaconda2\Lib, edit _nsis.py, add two lines under 'import sys' as:
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
then in dir C:\ProgramData\Anaconda2, enter the cmd:
python .\Libs_nsis.py mkmenus

fcjdgmrvwm commented Sep 2, 2017

if u encounter this problem, UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4
please get into this path, usually, C:\ProgramData\Anaconda2\Lib, edit _nsis.py, add two lines under 'import sys' as:
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
then in dir C:\ProgramData\Anaconda2, enter the cmd:
python .\Libs_nsis.py mkmenus

@TutCanada

This comment has been minimized.

Show comment
Hide comment
@TutCanada

TutCanada Sep 6, 2017

I had this same problem in Windows 10, while installing from the executable Anaconda3-4.4.0-Windows-x86_64.exe. After trying several options, including the commands suggested above by christakahashi, the one that worked for me was to turn OFF virus checking in Windows Defender.

TutCanada commented Sep 6, 2017

I had this same problem in Windows 10, while installing from the executable Anaconda3-4.4.0-Windows-x86_64.exe. After trying several options, including the commands suggested above by christakahashi, the one that worked for me was to turn OFF virus checking in Windows Defender.

@8gentile

This comment has been minimized.

Show comment
Hide comment
@8gentile

8gentile Oct 23, 2017

use cmd not powershell. problem solved

8gentile commented Oct 23, 2017

use cmd not powershell. problem solved

@cvredenburgh

This comment has been minimized.

Show comment
Hide comment
@cvredenburgh

cvredenburgh Nov 4, 2017

OK, working in Win 10 on Dell XPS turning off the Win Defender and installing as Administrator for all users after uninstalling other versions of python worked.

cvredenburgh commented Nov 4, 2017

OK, working in Win 10 on Dell XPS turning off the Win Defender and installing as Administrator for all users after uninstalling other versions of python worked.

@edogaafx

This comment has been minimized.

Show comment
Hide comment
@edogaafx

edogaafx Nov 5, 2017

As for me, I got python 3.5 already and a lot of other developer tools on my dekstop pc.
Running Anaconda3.5.0.1 installer as Administrator and choosing install path without spaces solved the problem.

edogaafx commented Nov 5, 2017

As for me, I got python 3.5 already and a lot of other developer tools on my dekstop pc.
Running Anaconda3.5.0.1 installer as Administrator and choosing install path without spaces solved the problem.

@slipnickeldatamunch

This comment has been minimized.

Show comment
Hide comment
@slipnickeldatamunch

slipnickeldatamunch Nov 14, 2017

The fix for me was to adjust one of the two java path statements. When you look at it in Windows 10 GUI, all look the same but when you see it in text, the /bin entry is in quotes. Removing those quotes allowed it to complete without removing the java path statements.

slipnickeldatamunch commented Nov 14, 2017

The fix for me was to adjust one of the two java path statements. When you look at it in Windows 10 GUI, all look the same but when you see it in text, the /bin entry is in quotes. Removing those quotes allowed it to complete without removing the java path statements.

@rmundkowsky

This comment has been minimized.

Show comment
Hide comment
@rmundkowsky

rmundkowsky Nov 14, 2017

I am guessing that the installer like had a problem based on multiple visual c++ binaries being installed. I currently only have one and the install worked fine. Back when I had the problem, I had multiple visual c++ binaries installed. This is totally a guess to the root cause of the problem. But I do thing other settings help (e.g. keep path to Conda short, no spaces in the path, install as admin).

rmundkowsky commented Nov 14, 2017

I am guessing that the installer like had a problem based on multiple visual c++ binaries being installed. I currently only have one and the install worked fine. Back when I had the problem, I had multiple visual c++ binaries installed. This is totally a guess to the root cause of the problem. But I do thing other settings help (e.g. keep path to Conda short, no spaces in the path, install as admin).

@larssonbajra

This comment has been minimized.

Show comment
Hide comment
@larssonbajra

larssonbajra Nov 15, 2017

anaconda

This is the error im facing.. Please help

larssonbajra commented Nov 15, 2017

anaconda

This is the error im facing.. Please help

@goanpeca

This comment has been minimized.

Show comment
Hide comment
@goanpeca

goanpeca Nov 15, 2017

Member

@larssonbajra please open a new issue

Member

goanpeca commented Nov 15, 2017

@larssonbajra please open a new issue

@jtcours

This comment has been minimized.

Show comment
Hide comment
@jtcours

jtcours Nov 30, 2017

Hello all. I may have a handle on part of the problem. I'm hoping it sparks some ideas for others.

We're installing without admin privileges--local user only--on a Win 7 Enterprise 64 bit machine.

We first ran into the failure to create menus. I worked around it by opening a command prompt and running the commands below, following the lead of some of the previous posters. If you try this step, please note that I had to run them using python.exe, not pythonw.exe, and that I ran them from the installation directory:

C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" addpath
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" mkdirs
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" mkmenus

That got us menu entries and a working Jupyter notebook.

The next problem was when we tried to launch Spyder. It gave the same popup others have been getting about a missing Qt plugin: This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

The first issue was that the path to spyder-script.py in the menu shortcut for Spyder was too long, and Windows truncated it at 260 characters. Here's what was in the shortcut's target. Notice there's no trailing close quote:
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\pythonw.exe C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\cwp.py C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3 "C:/Users/mxxxxxxn/AppData/Local/Continuum/Anaconda3/pythonw.exe" "C:/Users/mxxxxxxn

I'm not sure whether Windows keeps the full path buried somewhere, but just in case I created copy of cwp.py called cwp2.py and modified it to expand the "@" symbol to a full path:

# ADJUSTMENT:	
# If the caller included the "@" symbol in the args, replace it with
# the value of prefix to let callers use a shorter path.
args = [arg.replace('@', prefix) for arg in args]

subprocess.call(args, env=env)

That let me shorten the target in the menu entry to this:
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\pythonw.exe C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\cwp2.py C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3 "@/pythonw.exe" "@/Scripts/spyder-script.py"

Unfortunately, pythonw is still generating the error about the missing Qt plugin. The empty string in the popup suggests it's getting an incomplete search path, but I'm not sure where its path information comes from.

jtcours commented Nov 30, 2017

Hello all. I may have a handle on part of the problem. I'm hoping it sparks some ideas for others.

We're installing without admin privileges--local user only--on a Win 7 Enterprise 64 bit machine.

We first ran into the failure to create menus. I worked around it by opening a command prompt and running the commands below, following the lead of some of the previous posters. If you try this step, please note that I had to run them using python.exe, not pythonw.exe, and that I ran them from the installation directory:

C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" addpath
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" mkdirs
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3>python.exe -E -s "C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\Lib\_nsis.py" mkmenus

That got us menu entries and a working Jupyter notebook.

The next problem was when we tried to launch Spyder. It gave the same popup others have been getting about a missing Qt plugin: This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

The first issue was that the path to spyder-script.py in the menu shortcut for Spyder was too long, and Windows truncated it at 260 characters. Here's what was in the shortcut's target. Notice there's no trailing close quote:
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\pythonw.exe C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\cwp.py C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3 "C:/Users/mxxxxxxn/AppData/Local/Continuum/Anaconda3/pythonw.exe" "C:/Users/mxxxxxxn

I'm not sure whether Windows keeps the full path buried somewhere, but just in case I created copy of cwp.py called cwp2.py and modified it to expand the "@" symbol to a full path:

# ADJUSTMENT:	
# If the caller included the "@" symbol in the args, replace it with
# the value of prefix to let callers use a shorter path.
args = [arg.replace('@', prefix) for arg in args]

subprocess.call(args, env=env)

That let me shorten the target in the menu entry to this:
C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\pythonw.exe C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3\cwp2.py C:\Users\mxxxxxxn\AppData\Local\Continuum\Anaconda3 "@/pythonw.exe" "@/Scripts/spyder-script.py"

Unfortunately, pythonw is still generating the error about the missing Qt plugin. The empty string in the popup suggests it's getting an incomplete search path, but I'm not sure where its path information comes from.

@mohansriramakrishna

This comment has been minimized.

Show comment
Hide comment
@mohansriramakrishna

mohansriramakrishna Dec 9, 2017

I am having same problem, I think why this happen to me is because of I was deleted Anaconda3 folder instead of uninstalling it. So, when I am trying to reinstall it , It's saying failed to add menus. I have to clean the previous paths and other stuff. I don't know how to this please help me to overcome this.

mohansriramakrishna commented Dec 9, 2017

I am having same problem, I think why this happen to me is because of I was deleted Anaconda3 folder instead of uninstalling it. So, when I am trying to reinstall it , It's saying failed to add menus. I have to clean the previous paths and other stuff. I don't know how to this please help me to overcome this.

@mohansriramakrishna

This comment has been minimized.

Show comment
Hide comment
@mohansriramakrishna

mohansriramakrishna Jan 2, 2018

Here is the solution I have found.

  1. Locate to the Anaconda3 directory where it is installed.
  2. And then go to the lib directory.
    Open cmd type below commands.

cd C:\Anaconda3\Lib (Assume installed directory C:)

  1. Run _nsis.py . Follow below steps to addpath, mkdirs, mkmenus

C:\python.exe _nsis.py addpath
C:\python.exe _nsis.py mkdirs
C:\python.exe _nsis.py mkmenus
That's it. Hope it'll helps you to solve this problem.

mohansriramakrishna commented Jan 2, 2018

Here is the solution I have found.

  1. Locate to the Anaconda3 directory where it is installed.
  2. And then go to the lib directory.
    Open cmd type below commands.

cd C:\Anaconda3\Lib (Assume installed directory C:)

  1. Run _nsis.py . Follow below steps to addpath, mkdirs, mkmenus

C:\python.exe _nsis.py addpath
C:\python.exe _nsis.py mkdirs
C:\python.exe _nsis.py mkmenus
That's it. Hope it'll helps you to solve this problem.

@VincentRouvreau

This comment has been minimized.

Show comment
Hide comment
@VincentRouvreau

VincentRouvreau Jan 24, 2018

Thank you @piilupart88 I had an old Java path installation in my Path environment variable. I removed it, and it works !!

VincentRouvreau commented Jan 24, 2018

Thank you @piilupart88 I had an old Java path installation in my Path environment variable. I removed it, and it works !!

@ImmortalSon

This comment has been minimized.

Show comment
Hide comment
@ImmortalSon

ImmortalSon Feb 21, 2018

After trying almost all suggestions in this thread (removing java entries from PATH, running the installer as normal user / admin, installing only for myself / everyone, installing Miniconda and running conda install anaconda, running the scripts after install, uninstalling and reinstalling a dozen times) - nothing worked. The menu items in start menu stubbornly remained missing, and the anaconda prompt gave the infamous activate.bat error.

There was one suggestion that I could not try: temporarily disabling the anti-virus (Webroot SecureAnywhere), as it is a company machine (Surface Pro 4) and corporate policy doesn't allow even opening the Webroot interface, let alone disable it temporarily. Upon a hunch, I decided to try and install Anaconda in Windows SAFE MODE, and it worked!

Here's what I did:

  1. Uninstalled old non-working Anaconda, cleaned up PATH, restarted machine. I had JRE installed (not JDK), but I didn't uninstall it, as I need it for other programs. Also, there were several VC++ runtimes installed, I left them all alone.
  2. As given in https://www.itecs.ncsu.edu/helpdesk/kb/installing-programs-in-safe-mode/ I enabled services for installing programs in safe mode.
  3. Entered Safe Mode via shift-restart and chose WITHOUT networking, since I had downloaded the full Anaconda 5.1.0 x64 installer, and wasn't going to install vscode - I wanted the fewest services running. Crucially, Webroot SecureAnywhere wasn't running.
  4. Installed Anaconda for all users into the default C:\ProgramData\anaconda3 folder, and accepted the default options on PATH (unchecked) and registering python (checked).
  5. Skipped installing vscode.
  6. Rebooted normally. Lo and behold, Anaconda installed properly with all menu entries! I started Navigator for the first time, and launched Spyder with out any issues. Whew!

And created a GitHub account to post this update, in case there is any one else tearing their hair trying to install Anaconda...

ImmortalSon commented Feb 21, 2018

After trying almost all suggestions in this thread (removing java entries from PATH, running the installer as normal user / admin, installing only for myself / everyone, installing Miniconda and running conda install anaconda, running the scripts after install, uninstalling and reinstalling a dozen times) - nothing worked. The menu items in start menu stubbornly remained missing, and the anaconda prompt gave the infamous activate.bat error.

There was one suggestion that I could not try: temporarily disabling the anti-virus (Webroot SecureAnywhere), as it is a company machine (Surface Pro 4) and corporate policy doesn't allow even opening the Webroot interface, let alone disable it temporarily. Upon a hunch, I decided to try and install Anaconda in Windows SAFE MODE, and it worked!

Here's what I did:

  1. Uninstalled old non-working Anaconda, cleaned up PATH, restarted machine. I had JRE installed (not JDK), but I didn't uninstall it, as I need it for other programs. Also, there were several VC++ runtimes installed, I left them all alone.
  2. As given in https://www.itecs.ncsu.edu/helpdesk/kb/installing-programs-in-safe-mode/ I enabled services for installing programs in safe mode.
  3. Entered Safe Mode via shift-restart and chose WITHOUT networking, since I had downloaded the full Anaconda 5.1.0 x64 installer, and wasn't going to install vscode - I wanted the fewest services running. Crucially, Webroot SecureAnywhere wasn't running.
  4. Installed Anaconda for all users into the default C:\ProgramData\anaconda3 folder, and accepted the default options on PATH (unchecked) and registering python (checked).
  5. Skipped installing vscode.
  6. Rebooted normally. Lo and behold, Anaconda installed properly with all menu entries! I started Navigator for the first time, and launched Spyder with out any issues. Whew!

And created a GitHub account to post this update, in case there is any one else tearing their hair trying to install Anaconda...

@alexeiz

This comment has been minimized.

Show comment
Hide comment
@alexeiz

alexeiz Mar 10, 2018

How come this is closed? The issue is still here. I hit it when trying to install miniconda via scoop. Scoop runs the installer in silent mode, so the problem becomes even harder to identify.

Anyway, the issue has to do with either Windows PATH being too long, or PATH containing non-existent directories, or the whole environment variables block is too large. I was able to resolve this issue by reducing PATH to bare essentials temporarily in a command prompt:

set Path=C:\Windows\System32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0

And when I ran the installer from that command prompt, it finally worked.

alexeiz commented Mar 10, 2018

How come this is closed? The issue is still here. I hit it when trying to install miniconda via scoop. Scoop runs the installer in silent mode, so the problem becomes even harder to identify.

Anyway, the issue has to do with either Windows PATH being too long, or PATH containing non-existent directories, or the whole environment variables block is too large. I was able to resolve this issue by reducing PATH to bare essentials temporarily in a command prompt:

set Path=C:\Windows\System32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0

And when I ran the installer from that command prompt, it finally worked.

@jetilton

This comment has been minimized.

Show comment
Hide comment
@jetilton

jetilton Apr 2, 2018

I had the same issue went through a lot of the above. Deleted anything anaconda/conda related and deleted my Path variable for my user. Everything installed as expected.

jetilton commented Apr 2, 2018

I had the same issue went through a lot of the above. Deleted anything anaconda/conda related and deleted my Path variable for my user. Everything installed as expected.

@mars0925

This comment has been minimized.

Show comment
Hide comment
@mars0925

mars0925 Apr 4, 2018

delete all Environmental variables PATH and install again. it work for me

mars0925 commented Apr 4, 2018

delete all Environmental variables PATH and install again. it work for me

@yhling

This comment has been minimized.

Show comment
Hide comment
@yhling

yhling Apr 4, 2018

Trying to install Anaconda 64-bit on a Windows 7 work machine, with only user privileges.

The only thing that worked for me is installing it directly under C:\. Installation completed successfully.

yhling commented Apr 4, 2018

Trying to install Anaconda 64-bit on a Windows 7 work machine, with only user privileges.

The only thing that worked for me is installing it directly under C:\. Installation completed successfully.

@ldfreight

This comment has been minimized.

Show comment
Hide comment
@ldfreight

ldfreight May 22, 2018

issue is still there. I am installing for all users with an admin account, on default path C:\ProgramData\Anaconda3

ldfreight commented May 22, 2018

issue is still there. I am installing for all users with an admin account, on default path C:\ProgramData\Anaconda3

@akhilachitluri

This comment has been minimized.

Show comment
Hide comment
@akhilachitluri

akhilachitluri Sep 29, 2018

I am trying to install Anaconda2 version 5.2.0 32-bit in windows .I am getting this error.
error

akhilachitluri commented Sep 29, 2018

I am trying to install Anaconda2 version 5.2.0 32-bit in windows .I am getting this error.
error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment