Open metorm opened 6 years ago
The path is not too long. Shortcuts have a very long limit (32k characters I think). The problem here is that the Windows dialog that shows and allows you to edit shortcuts is limited to 260 odd characters. This means editing it in this dialog breaks it.
You can drop a .lnk file into any hex editor to see the full contents.
On Fri, Dec 15, 2017 at 1:02 PM, Wesley Ranger notifications@github.com wrote:
I am using the anaconda installation installed by VS 2017. The default installation path is C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64
Here comes the problem: the path is too long for windows to parse using a shortcut. Take the default Anaconda Prompt shortcut for example. Since the maximum allowed command length is 260, the command is cut like this:
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\pythonw.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\cwp.py" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64" %windir%\system32\cmd.exe "/K" "C
Which obviously cannot be correctly parsed.
I think there shall be some way to fix this.
BTW, anyone please post me the full command?
β You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ContinuumIO/anaconda-issues/issues/7789, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_pdN-BEYHpmvYZgi6B7YxuN7B3ky8Vks5tAm3mgaJpZM4RDc5L .
Well, I first noticed this because the shortcut failed to execute. I think I didn't edit the shortcut before.
The failure to execute is not caused by it being long I'm afraid. You need to dig into what happens when you run it from cmd.exe, replacing pythonw.exe
with python.exe
(so yes getting the full value is important. I do not know which version of Anaconda comes with VS2017 so I cannot advise on that beyond 'use a hex editor').
It is a good idea to use python.exe
to replace pythonw.exe
, but I am afraid that I won't have to chance to dig any deeper ...
Before your first reply is posted, I already uninstalled the anaconda comes with VS 2017 and installed a new one in the default location C:\PragramData\
. It is working as expected.
Thank you anyway.
Can someone please paste me original lnk file to Anaconda prompt (After installation/update of VS 2017)? I tried to edit it in dialog and now it is broken. I would not like to completely reinstall everything. I would try to recreate this original lnk although it does not work anyway. It worked before VS 2017 update but now I cannot run prompt and cannot launch apps from Anaconda Navigator. Anaconda updates also do not work properly. Thank you
@metorm , I had the same problem. Delete the C at the end. Should work. "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\pythonw.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\cwp.py" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64" %windir%\system32\cmd.exe "/K" "
πππ
εθͺζηε°η±³ζζΊ ε¨ Lucas Fernandez Seivane notifications@github.comοΌ2018εΉ΄1ζ19ζ₯ δΈε7:19ειοΌ
@metormhttps://github.com/metorm , I had the same problem. Delete the C at the end. Should work. "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\pythonw.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\cwp.py" "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64" %windir%\system32\cmd.exe "/K" "
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ContinuumIO/anaconda-issues/issues/7789#issuecomment-358938337, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALhd-OGzWWsv3cWvcyceqAO0k9Z7Z6U2ks5tMHpPgaJpZM4RDc5L.
we can do this:
%USERPROFILE%\Anaconda3\pythonw.exe -m webbrowser -t "https://anaconda.org/"
%USERPROFILE%\Anaconda3\pythonw.exe %USERPROFILE%\Anaconda3\cwp.py %USERPROFILE%\Anaconda3 "%USERPROFILE%\Anaconda3\pythonw.exe" "%USERPROFILE%\Anaconda3\Scripts\anaconda-navigator-script.py"
%windir%\System32\cmd.exe "/K" %USERPROFILE%\Anaconda3\Scripts\activate.bat %USERPROFILE%\Anaconda3
%USERPROFILE%\Anaconda3\python.exe %USERPROFILE%\Anaconda3\cwp.py %USERPROFILE%\Anaconda3 %USERPROFILE%\Anaconda3\python.exe %USERPROFILE%\Anaconda3\Scripts\jupyter-notebook-script.py %USERPROFILE%
%USERPROFILE%\Anaconda3\pythonw.exe %USERPROFILE%\Anaconda3\cwp.py %USERPROFILE%\Anaconda3 %USERPROFILE%\Anaconda3\pythonw.exe %USERPROFILE%\Anaconda3\Scripts\spyder-script.py
I am using the anaconda installation installed by VS 2017. The default installation path is
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64
Here comes the problem: the path is too long for windows to parse using a shortcut. Take the default
Anaconda Prompt
shortcut for example. Since the maximum allowed command length is 260, the command is cut like this:Which obviously cannot be correctly parsed.
I think there shall be some way to fix this.
BTW, anyone please post me the full command?