Type " conda" to confirm that things work. Exit the PowerShell and open Git Bash.My PowerShell window would look a little different than yours because of my prompt but it makes no difference. If you scroll down in the explorer, you should be able to find it. This works even if you don't have the right paths because the command line looks for the right exe in the current dictionary. Type in " conda init" in the PowerShell window.Note: you can just click " Git Bash" and you open Bash instead which makes no difference to the command. Shift + Right Click on the explorer and click on " Open PowerShell Windows Here". You can directly open command windows with explorer instead of struggling with paths.įind your Anaconda3 folder with Windows Explorer This could be a user install where would be in your user folder such as "C:/Users/your_name/Anaconda3". starriet had the working answer but I am going to make it easier for everyone else reading. I tried to do the same thing as you did but I couldn't get it to work. profile file to load the file we've just created, conda_start.sh, instead. Since the above doesn't modify the file provided by anaconda, you will need to update your. The second sed command replaces the _CONDA_EXE variable by the new alias created. This sed command inserts a new alias definition myconda which changes the anaconda path from Program Files to Program\ Files so bash doesn't stop with an error like this one: bash: /c/Program: No such file or directory e 's/\$_CONDA_EXE/myconda/g' /c/Program\ Files/Anaconda3/etc/profile.d/conda.sh > conda_start.sh In that case you would need to change the anaconda location or edit conda.sh script with something like: sed -e '/^_CONDA_EXE=.*/a alias myconda="$"' \ You may encounter problems if the path where Anaconda was installed contains spaces ( e.g., C:\Program Files). c/Anaconda3/etc/profile.d/conda.sh" > ~/.profile A way of doing so is running the follwing: echo ". bashrc file ( read more about their differences). after this you'll be able just to call python scripts without specifying the python executable at all. pyPython.File ftype Python.FileC:\path\to\Anaconda\python.exe '1'. To keep this setup permanently you can add such line on your. or you can run the following two commands as an admin in cmd to make windows pipe every. c/Anaconda3/etc/profile.d/conda.shĪfter running that you should be able to run conda commands. With the above approach you can run all conda commands from a local Bash Terminal on Windows with Basic Cygwin commands. If it doesn't, as it seems your case, then you can run their setup directly by running. What worked for me with similar case is MobaXterm terminal for Windows, you just need to enable option 'use Windows PATH' from it's Terminal Settings and ensure that you have Anaconda in your Windows PATH. Many times I've seen that's done by default - as shown in the setup for this workshop. To be able to run conda on gitbash you need to add it to the path.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |