콘 다를 실행하는 방법?
리눅스 컴퓨터에서 conda를 어떻게 실행합니까?
Anaconda를 설치하고 Python을 실행할 수 있으므로 올바르게 설치했다고 가정합니다.
이 안내서에 따라 http://docs.continuum.io/conda/intro.html , Python33을 설치하려고하므로 다음 줄을 복사하여 콘솔에 붙여 넣습니다.
conda create -n py33 python=3.3 anaconda
그러나 그것은 나에게 오류를 준다 :
-bash: conda: command not found
Conda를 실행하려면 어떻게해야합니까?
이것을 시도하고 싶을 수도 있습니다.
아나콘다 2의 경우 :
export PATH=~/anaconda2/bin:$PATH
아나콘다 3의 경우 :
export PATH=~/anaconda3/bin:$PATH
아나콘다 4의 경우 :
아나콘다 프롬프트 사용
그리고
conda --version
작동하는지 확인하십시오. 내보내기 PATH = ~ / anaconda3 / bin : $ PATH 는 작동하지만 sudo nano ~ / .bashrc 를 실행 한 다음 경로를 파일에 복사하고 경로를 활성화 한 후 저장 해야하는 순서 변경으로 터미널을 종료하면 중지 됩니다. source .bashrc 사용하여 변경합니다 .
설치되지 않은 경우 conda install anaconda-navigator로 확인하십시오. anaconda 설치 지침을 다시 따르십시오.
이 비디오와 함께 https://youtu.be/Pr25JlaXhpc
경로를 설정하지 않은 것으로 나타났습니다.
그렇게하려면 먼저 .bash_profile을 편집해야했습니다 (내 로컬 데스크톱에 다운로드하여 Linux에서 파일을 텍스트로 편집하는 방법을 모르겠습니다)
그런 다음 이것을 .bash_profile에 추가하십시오.
PATH=$PATH:$HOME/anaconda/bin
이 정보는 현재 2016 년 8 월 10 일을 기준으로 최신 정보입니다. 위에 게시 된 방법을 사용하여이 문제를 해결하기 위해 수행 한 정확한 단계는 다음과 같습니다. 나는 아무도 게시물을 보지 못했다 : export PATH=$PATH:$HOME/anaconda/bin
(라인의 시작 부분에 내보내기를 추가해야 함).
다음은 단계별입니다.
oh-my-zsh를 사용하는 동안 동일한 문제가 발생하는 사람은 다음을 수행해야합니다.
.zshrc
터미널에서 -를 엽니 다 . 기본 텍스트 편집기를 사용 iTerm 2
하고 있습니다 Sublime Text 3
.
subl ~/.zshrc
-텍스트 편집기에서 파일이 열리면 맨 아래로 스크롤하여 다음을 추가하십시오.
export PATH=$PATH:$HOME/anaconda/bin
파일을 저장 한 다음 닫습니다.
터미널을 닫았다가 다시 시작하십시오.
터미널에 다시 입력 한 후 다음을 입력하십시오.
conda --v
그러면 conda
설치된 버전이 화면에 인쇄되어 나타납니다.
zsh를 사용하는 경우 터미널에 표시되면이 표시 될 수 있습니다 zsh: command not found: rvm-prompt
.
해결책은 다음과 같습니다.
- 파일
alias rvm-prompt=$HOME/.rvm/bin/rvm-prompt
내에 추가.zshrc
하십시오. - 을 입력하십시오
source .zshrc
.
그러면 zsh: command not found: rvm-prompt
의지가 사라집니다.
Anaconda를 설치했지만 올바른 버전의 python 및 ipython을로드 할 수 없거나 conda를 사용할 때 conda : 명령을 찾을 수없는 경우 PATH 환경 변수에 문제가있을 수 있습니다. 프롬프트에서 다음을 입력하십시오.
export PATH=~/anaconda/bin:$PATH
이 예 에서는 Anaconda가 기본 ~/anaconda
위치에 설치되어 있다고 가정합니다 .
~ / .bash_profile을 편집하여 추가하십시오.
PATH=$PATH:$HOME/anaconda/bin
그런 다음 실행
source ~/.bash_profile
희망이 당신을 도울 수 있습니다.
내 환경 : macOS 및 아나콘다 3
이것은 나를 위해 작동합니다 :
$ nano ~/.bash_profile
이거 추가 해봐:
export PATH=~/anaconda3/bin:$PATH
종료하고 실행하십시오.
$ source ~/.bash_profile
그런 다음 시도하십시오.
$ jupyter notebook
High Sierra MAC OS를 사용하고 있으며 HomeBrew 명령을 통해 Anaconda3을 설치했습니다. 나는 달리기에 문제가 있었다 :
conda
또한 나에게 줄 것이다 :
-bash: conda: command not found
나는 달리기를 시도했다.
export PATH=~/anaconda3/bin:$PATH
그러나 전체 경로가 필요합니다. 올바른 단계는 다음과 같습니다.
$ nano ~/.bash_profile
이제 전체 경로를 내보내십시오. 제 경우에는 다음과 같습니다.
export PATH=/usr/local/anaconda3/bin:$PATH
종료하고 실행하십시오.
$ source ~/.bash_profile
그런 다음 시도하십시오.
$ conda
출력됩니다 :
$ conda --version
conda 4.4.10
Anaconda를 설치했고 확실히 다음 yes
과 같이 말한 경우 :
Do you wish the installer to prepend the Anaconda install location to PATH in your /home/name/.bashrc ? [yes¦no]
question then you maybe just need to restart your terminal window. The change won't take effect until you either (1) close and reopen the current window or (2) just open and start working in a new window
Basically, open a new console window and see if it works now.
For Windows:
A recent Anaconda(version 4.4.0) changed some directories. You can find "conda" in Anaconda3/Scripts, instead of Anaconda3/bin.
If you have just installed anaconda and got this error, then I think you forgot to run this command :
source ~/.bashrc
This will enable you to make use of anaconda in terminal.
This may seems simple but many (including me) do this mistake.
If the error is still persisting, you have to verify if anaconda location is added to PATH in your system.
Once you add it, you'll be fine
Use conda init
As pointed out in a different answer, manually adding Conda on $PATH
is no longer recommended as of v4.4.0 (see Release Notes). Furthermore, since Conda v4.6 new functionality to manage shell initialization via the conda init
command was introduced. Hence, the updated recommendation is to run
./anaconda3/bin/conda init --dry-run -vv
first to verify the changes it will make. If you don't already have a Conda-managed section in your shell run commands file (e.g., .bashrc
), then this should appear like a straight-forward insertion of some new lines. In which case, proceed to run
./anaconda3/bin/conda init -vv
If it isn't such a straightforward insertion, I'd recommend clearing any previous Conda sections from $PATH
and the relevant shell initialization files (e.g., bashrc
) first, so that it is, and then run the commands as above.
You must launch a new shell or source your init file (e.g., source .bashrc
) for the changes to take effect.
Potential Automated Cleanup
Note that in Conda v4.6.9 there was also introduced a --reverse
flag to remove changes from a conda init
. However, I haven't tested this, and running conda init --reverse --dry-run -vv
on my system shows it wouldn't change anything, i.e., it doesn't appear reliable.
Mostly it is because when we install Anaconda in the end it adds the anaconda path to PATH variable in .bashrc file. So we just need to restart the terminal or just do
source ~/.bashrc
if still it don't work then follow this commands.
cat >> ~/.bashrc
paste the below command for anaconda3
export PATH=~/anaconda3/bin:$PATH
hit Enter then ctrl+d
source ~/.bashrc
If you have installed anaconda, but if you are not able to execute conda command from terminal, it means the path is not probably set, try :
export PATH=~/anaconda/bin:$PATH
See this link.
Run
cat ~/.bash_profile
to check if anaconda is there. If not you should add its path there. If conda is there copy the entire row that you see the Anaconda there from "export" to the end of line. like this:
export PATH=~/anaconda3/bin:$PATH
Run this in your terminal. Then run
conda --version
to see if it is exported and running!
System: macOS
I installed Anaconda first, and everything worked well. Then I installed iTerm2 and when I typed Python
iTerm2 gave me the default Python. Here is how to find your Anaconda Python back:
Open your
.zshrc
file. For example,vim ~/.zshrc
Then add
export PATH="/Users/yourusername/anaconda2/bin:$PATH"
to the last line of the file. Note that you need to replace theyourusername
to your user name and make sure you have anaconda2. An easy way is to copy this line from~/.bash_profile
Save the file, close it, relaunch the terminal and now Anaconda Python should be back.
If you have just installed MiniConda or Anaconda make sure you re-run your terminal.
From this, I mean close and open your terminal and then try conda list to verify your installation
For me, this worked!!
I also was facing the same issue ,this might be the simplest possible solution
source anaconda/bin/activate
for anaconda2 use
source anaconda2/bin/activate
depending on the name of the directory , then execute your command i.e. conda --create
Answer for
- Anaconda3 5.2.0 installer
- macOS HighSierra
- ZSH
- Unfortunately, the installer puts the PATH definition only into
.bash_profile
, but not the.zshrc
config. - Contrary to the given answers, it doesn't (necessarily) install in
~/anaconda3/
, but instead in/anaconda3/
.
The PATH
defintion in .zshrc
must therefore be this:
...
# Anaconda3
export PATH="/anaconda3/bin:$PATH"
...
Open your terminal and type the following command to add anaconda to environment path
for anaconda 2 :
export PATH=~/anaconda2/bin:$PATH
for anaconda 3 :
export PATH=~/anaconda3/bin:$PATH
Then to check the conda version just type,
conda --version
Create an environment using the following command,
conda create --name myenv
Activate the source using,
source activate myenv
Then your anaconda IDE is ready!!!
Temporary solution:
$anaconda/bin/conda create -n py33 python=3.3 anaconda
I am setting up a virtual machine running Ubuntu. I have anaconda 3 installed in the "Home" folder. When I typed "conda" into the terminal I was getting the error "conda: command not found" too.
Typing the code below into the terminal worked for me...
export PATH=$PATH:$HOME/anaconda3/bin
to check it worked I typed:
conda --version
which responded with the version number.
You need to put Anaconda.sh to your /home/, then run it to install. After that, you can runexport PATH=~/anaconda3/bin:$PATH
. Remark: do not run Anaconda.sh in download/ directily!!!!!
First, check the location of anaconda, for me I installed anaconda3 at / directory which I access with /anaconda3
Then in your terminal, input export PATH="<base location>/anaconda3/bin:$PATH"
for me it's export PATH="/anaconda3/bin:$PATH"
.
Finally, input source $/anaconda3/bin/activate
. For you, just change to your location.
Now, you could try conda list to test.
Also, visit intallation guide
1. Check where you have installed Anaconda. In my case it looks like /home/nour/anaconda3/bin
- Open your
.bashrc
file. For example$ gedit .bashrc
3. Add this export PATH = /home/nour/anaconda3/bin:$PATH
line at the end of the file and save.
- Reopen the terminal. Type
conda --version
NOTE: Make sure path in line no. 1 and line no. 3 must be same. In my case /home/nour/anaconda3/bin
.
To edit bashrc in Ubuntu
$ /usr/bin/vim ~/.bashrc
type PATH=$PATH:$HOME/anaconda3/bin
Press Esc and :wq
to save bashrc file and exit vim enter image description here
then
$ export PATH=~/anaconda3/bin:$PATH
and type $ source ~/.bashrc
Now to confirm the installation of conda type
$ conda --version
If you installed Anaconda with Visual Studio 2017 for Windows, conda executable is in this path or similar.
In my case path is this: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts
Steps to add it to your PATH:
- On the Windows desktop, right-click My Computer.
- In the pop-up menu, click Properties.
- In the System Properties window, click the Advanced tab, and then click Environment Variables.
- In the System Variables window, highlight Path, and click Edit.
- Add your path and restart your cmd.
You will be able to execute conda
Happy coding!
Using the export PATH=
strategy with conda activate
will result into a warning message for conda>=4.4.
The recommended way (see this release note, and this post) to do is to remove the export PATH=...
line and add instead in your .bashrc
(.bash_profile
) the line:
. ~/anaconda2/etc/profile.d/conda.sh
Furthermore, if you want conda to be activated by default, add:
conda activate
For Windows:
PATH=%USERPROFILE%\Continuum\Anaconda4.4.0\Library\bin;%PATH%
In my case conda Path was properly set (in .bashrc) by the conda installation bash. But to make it works I had to give executable file permissions to files in bin sub folder with chmod +x *
.
My system info:
conda 4.2.9
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.16.0-4-amd64
Architecture: x86-64
I had same issue. What I did, removed anaconda directory from the install location and re-install after that it worked as I anticipated
참고URL : https://stackoverflow.com/questions/18675907/how-to-run-conda
'IT' 카테고리의 다른 글
C 프로그램의 실행 시간 (0) | 2020.05.12 |
---|---|
Ruby on Rails-CSV 파일에서 데이터 가져 오기 (0) | 2020.05.12 |
동적 (C # 4)과 var의 차이점은 무엇입니까? (0) | 2020.05.12 |
NPM이 종속성을 설치할 수 없음-잠기지 않은 것을 잠금 해제하려고했습니다. (0) | 2020.05.12 |
Instant와 LocalDateTime의 차이점은 무엇입니까? (0) | 2020.05.12 |