처음으로 anaconda와 가상 환경 만들기
                                            
                                                
                                                
                                                
                                                
                                                
                                                 4131 단어  Python3Bash파이썬TensorFlowAnaconda
                    
처음으로 Anaconda를 다운로드하고 가상 환경을 만들 때까지
처음으로 아나콘다의 가상 환경을 구축했지만 조금 막혔으므로 비망록으로 남깁니다.
 환경
Macbook pro 사용
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A583
 Anaconda-Navigator 설치 후 환경 구축
 
Open Terminal에서 터미널을 시작하고 환경을 전환합니다.
$ conda info -e
# conda environments:
# 現在の環境に*マークがついている。デフォルトはbase環境になっている。
base                  *  /Users/user_name/opt/anaconda3
環境名                    /Users/ユーザー名/opt/anaconda3/envs/環境名
여기에서 작성한 환경으로 변경할 때 다음 오류가 발생할 수 있지만 동일한 오류가 발생하면 bash
# conda activate 環境名 で環境を変更
$ conda activate tf141
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
    $ conda init <SHELL_NAME>
Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
이러한 오류가 발생하면 오류에 작성된 대로 conda init bash를 실행합니다.
$ conda init bash
$ source .bash_profile
$ conda activate 環境名
이제 가상 환경을 전환할 수 있었습니다. 그런 다음 TensorFlow를 설치하기 만하면됩니다.
$ conda install tensorflow
# エラーが出なければインストール完了
$ python
# pythonを起動して、tensorflowがインポートできるか確認します。
Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> この表示が出てくれれば、インストールできています。
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(처음으로 anaconda와 가상 환경 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/fumitrial8/items/7ee843e0031af70c13ce
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A583
$ conda info -e
# conda environments:
# 現在の環境に*マークがついている。デフォルトはbase環境になっている。
base                  *  /Users/user_name/opt/anaconda3
環境名                    /Users/ユーザー名/opt/anaconda3/envs/環境名
# conda activate 環境名 で環境を変更
$ conda activate tf141
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
    $ conda init <SHELL_NAME>
Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
$ conda init bash
$ source .bash_profile
$ conda activate 環境名
$ conda install tensorflow
# エラーが出なければインストール完了
$ python
# pythonを起動して、tensorflowがインポートできるか確認します。
Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> この表示が出てくれれば、インストールできています。
Reference
이 문제에 관하여(처음으로 anaconda와 가상 환경 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/fumitrial8/items/7ee843e0031af70c13ce텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)