ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 223 forks source link

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

Closed IkiAlex closed 7 years ago

IkiAlex commented 8 years ago

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!

msarahan commented 8 years ago

There may be up to three things at play here:

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

IkiAlex commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

IkiAlex commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 8 years ago

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 commented 8 years ago

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

develmusa commented 8 years ago

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 commented 8 years ago

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

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

Assuming = "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
eunseop90 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

eunseop90 commented 8 years ago

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.

augustoproiete commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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 :-

Jang-neudern commented 7 years ago

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 7 years ago

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 commented 7 years ago

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:

0) ** 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 ***** 1) Install Miniconda 2) As Admin open CMD and change to directory where Miniconda is installed 3) pythonw.exe -E -s "Lib_nsis.py" addpath 4) pythonw.exe -E -s "Lib_nsis.py" mkdirs 5) pythonw.exe -E -s "Lib_nsis.py" mkmenus 6) exit that CMD 7) 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: 8) conda install numpy note) this will install conda! lol 9) 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 commented 7 years ago

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 commented 7 years ago

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.

rmundkowsky commented 7 years ago

Tried that on Windows 8.1 and that does not work.

Robert

From: 11leven [mailto:notifications@github.com] Sent: Thursday, March 2, 2017 2:26 PM To: ContinuumIO/anaconda-issues anaconda-issues@noreply.github.com Cc: Mundkowsky, Robert rmundkowsky@ets.org; Comment comment@noreply.github.com Subject: Re: [ContinuumIO/anaconda-issues] Failed to create ( add ) Anaconda menus (to the system PATH) (#732)

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ContinuumIO/anaconda-issues/issues/732#issuecomment-283753182, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJ3N53UZGqOpxQWDoyHlrXM4S7z8Ybo0ks5rhxe-gaJpZM4H9oKM.


This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.


yangwe1 commented 7 years ago

I had the same problem, and finally solved it by reinstalling anaconda in root directory like C:.Maybe there are some troubles related to privileges.

yvi1 commented 7 years ago

Encountered the same installation error with Anaconda3-4.3.1-Windows-x86_64 and Windows 10. Used @jcmorris-mts fix above.

rmundkowsky commented 7 years ago

I wonder if might also be related to having multiple c++ redistributable packages installed.

yvi1 commented 7 years ago

After I removed all python distributions from my computer and cleared all PATHs related to python in sysdm.cpl, the installation worked fine with the following options.

  1. did NOT have to run it "as administrator"
  2. installed it "for myself only"
sis6789 commented 7 years ago
  1. Start CMD with admin.
  2. Start anaconda installer within CMD window as command.

That is all!

rmundkowsky commented 7 years ago

Actually that is not all that is needed! Read the thread and other internet posts.

piilupart88 commented 7 years ago

anaconda menu

Same here. I have Windows 10, admin rights and no odd characters. My installer refused to create Anaconda menus, and add Anaconda to PATH.

Like @Jang-neudern I had previosly installed some other IDEs and set up paths for Java.

My solution: delete previously set up Java paths and voila, Anaconda installs properly! inkedjavahome_li inkedjavajdk_li

xdnh commented 7 years ago

I changed my environment variable and deleted JAVA&jdk... And it works!

goanpeca commented 7 years ago

@electronwill might be worth documenting this somewhere?

electronwill commented 7 years ago

Yes, it would be good to add an item to https://docs.continuum.io/anaconda/troubleshooting about the errors "Failed to create Anaconda menus" and "Failed to add Anaconda to the system PATH". I'll draft a PR so we can discuss it.

mingwandroid commented 7 years ago

I can't think why the JAVA_HOME env. var would have any bearing on this .. I need to look into that.

goanpeca commented 7 years ago

I can't think why the JAVA_HOME env. var would have any bearing on this .. I need to look into that.

Me neither :-|

I'll draft a PR so we can discuss it.

Awesome, thanks @electronwill :-)

christakahashi commented 7 years ago

I'm having the same issue. win 10, x64, US english local. no space or non-ascii chars. short paths. opening an admin command prompt and retyping the failed installer commands seems to work (i say seems because they run without errors).

C:\WINDOWS\system32>"C:\Users\chris\Anaconda2\pythonw.exe" -E -s "C:\Users\chris\Anaconda2\Lib\_nsis.py" mkmenus

C:\WINDOWS\system32>"C:\Users\chris\Anaconda2\pythonw.exe" -E -s "C:\Users\chris\Anaconda2\Lib\_nsis.py" mkdirs

C:\WINDOWS\system32>"C:\Users\chris\Anaconda2\pythonw.exe" -E -s "C:\Users\chris\Anaconda2\Lib\_nsis.py" addpath

C:\WINDOWS\system32>"C:\Users\chris\Anaconda2\pythonw.exe" -E -s "C:\Users\chris\Anaconda2\pkgs\.cio-config.py" "C:\Users\chris\Downloads\Anaconda2-4.2.0-Windows-x86_64.exe"

Then attempting to open navigator gives me some issue about not finding qt.

In the anaconda prompt i was able to run

conda install qt

which allows navigator to open. hopefully that's all i need to do to get it running.

MayankArya19 commented 7 years ago

i am getting only one error and that says anaconda menus cant be in installed

AndrewKemendo commented 7 years ago

I'm on a Surface Book 64bit Win10 and used the above solution from April 25th: https://github.com/ContinuumIO/anaconda-issues/issues/732#issuecomment-296987211 and it worked.

Deleted the Oracle java path in environment variables

kswgit commented 7 years ago

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

solenovex commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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!