久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Windows 中的 Anaconda 和 Git Bash - conda: command not fou

Anaconda and Git Bash in Windows - conda: command not found(Windows 中的 Anaconda 和 Git Bash - conda: command not found)
本文介紹了Windows 中的 Anaconda 和 Git Bash - conda: command not found的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我已經(jīng)安裝了 Anaconda 并將 Path 環(huán)境變量設(shè)置為 C:Anaconda3;C:Anaconda3Scripts.

I've installed Anaconda and set Path environment variable to C:Anaconda3; C:Anaconda3Scripts.

然后我嘗試在 Git Bash 中運行

Then I try to run in Git Bash

conda 安裝 python

但是有一個錯誤信息bash: conda: command not found".我想知道為什么.

But there is an error message "bash: conda: command not found". I would like to know why.

推薦答案

為了能夠在 gitbash 上運行 conda,您需要將其添加到路徑中.很多時候我看到這是默認(rèn)完成的 - 如本次研討會的設(shè)置所示.如果沒有,就像您的情況一樣,那么您可以通過運行直接運行他們的設(shè)置:

To be able to run conda on gitbash you need to add it to the path. Many times I've seen that's done by default - as shown in the setup for this workshop. If it doesn't, as it seems your case, then you can run their setup directly by running:

. /c/Anaconda3/etc/profile.d/conda.sh

運行之后你應(yīng)該可以運行 conda 命令了.

After running that you should be able to run conda commands.

要永久保留此設(shè)置,您可以在 .profile.bashrc 文件 (閱讀更多關(guān)于它們的差異).這樣做的一種方法是運行以下內(nèi)容:

To keep this setup permanently you can add such line on your .profile or .bashrc file (read more about their differences). A way of doing so is running the follwing:

echo ". /c/Anaconda3/etc/profile.d/conda.sh" >> ~/.profile

如果安裝 Anaconda 的路徑包含空格(例如C:Program Files),您可能會遇到問題.在這種情況下,您需要更改 anaconda 位置或編輯 conda.sh 腳本,例如:

You may encounter problems if the path where Anaconda was installed contains spaces (e.g., C:Program Files). 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="${_CONDA_EXE/ /\\ }"' 
    -e 's/$_CONDA_EXE/myconda/g' /c/Program Files/Anaconda3/etc/profile.d/conda.sh > conda_start.sh

這個 sed 命令插入一個新的別名定義 myconda,它將 anaconda 路徑從 Program Files 更改為 Program Files,因此 bash 不會停止這樣的錯誤:

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

第二個 sed 命令用創(chuàng)建的新別名替換 _CONDA_EXE 變量.

The second sed command replaces the _CONDA_EXE variable by the new alias created.

由于上面沒有修改anaconda提供的文件,你需要更新你的.profile文件來加載我們剛剛創(chuàng)建的文件conda_start.sh,而不是.

Since the above doesn't modify the file provided by anaconda, you will need to update your .profile file to load the file we've just created, conda_start.sh, instead.

這篇關(guān)于Windows 中的 Anaconda 和 Git Bash - conda: command not found的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時出現(xiàn)問題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節(jié)點)
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應(yīng)并將元素值存儲在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標(biāo)記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對象)
主站蜘蛛池模板: 欧美精品二区 | 久久国产电影 | av天天看 | 成av在线 | 日韩有码一区 | 天堂精品视频 | 亚洲永久字幕 | 国产95在线 | 国产在线一区二区三区 | 高清视频一区二区三区 | 久久久国产精品网站 | 中文字幕在线视频网站 | 国产玖玖 | 欧美综合久久久 | 日韩一区二区在线看 | 欧美精品导航 | 人人干人人看 | 亚洲一区视频在线播放 | 一区二区三区中文字幕 | 免费看一级毛片 | 国产精品一区一区三区 | 黄色一级片在线播放 | 久久四虎 | 激情久久网 | 啪一啪| 日韩a v在线免费观看 | 久久国产香蕉 | 自拍在线| 欧美黄色小视频 | 在线视频亚洲 | 中文字幕日韩欧美一区二区三区 | 涩涩导航 | 国产一区二区三区四区三区四 | 亚洲国产一区视频 | 狠狠综合久久av一区二区小说 | 精品一区二区三区在线视频 | 国产精品夜间视频香蕉 | 国产精品视频网站 | 亚洲午夜在线 | 成人在线观看中文字幕 | 天天操狠狠操 |