问题
Recently I upgraded from Windows 8.1 to Windows 10. Although Windows said it didn't change anything to my files and folders, this was not the case. Only one of the shortcuts in my Anaconda folder in the start menu remained. This was the Anaconda Prompt so I thought I just run the following commands to fix my links:
conda update conda -f
conda update anaconda -f
Although this returned a few links, it did not restore everything which means I was stuck with a dysfunctional installation of Anaconda.
回答1:
The following worked for me (albeit on Windows 7):
- Open a command prompt as administrator
- Execute
"C:\Anaconda3\pythonw.exe" "C:\Anaconda3\Lib\_nsis.py" mkmenus
回答2:
I use Miniconda. When I updated with
conda update conda
there were these following lines along with the list of packages to be updated:
The following packages will be REMOVED:
console_shorcut-0.1.1-3
powershell_shortcut-0.0.1-2
I saw those lines after the update and the shortcut to the command window was gone. So I restored the Anaconda Prompt command window shortcut with
conda install console_shortcut
回答3:
When using Miniconda installed for the local user:
C:\Users\<username>\AppData\Local\Continuum\Miniconda3\pythonw.exe C:\Users\<username>\AppData\Local\Continuum\Miniconda3\Lib\_nsis.py mkmenus
This was also on Windows 7.
回答4:
mkmenus
did not work for me but the following worked on Windows 10 32-bit, Miniconda3.
- Open command prompt (admin privileges not required).
Navigate to your Miniconda\Scripts directory. Replace
kk
with your username.cd "C:\Users\kk\Miniconda3\Scripts"
Run Activate.bat
activate.bat
Install console_shortcut.
conda install -c anaconda console_shortcut
回答5:
To solve this I did the following:
- Remove Anaconda with "add or remove program" link
- Reinstall Anaconda with the latest installer link
After this everything is restored and since the uninstall program does not remove user files your environments and settings are also still there. If for some reason you stored projects in the Anaconda folder, this folder will be removed so watch out for that ;)
来源:https://stackoverflow.com/questions/34131496/how-to-restore-shortcuts-to-anaconda-after-upgrading-to-windows-10