[파이썬] #1- 아나콘다 설치, 아나콘다 파이썬 환경 만들기

[파이썬]#1- 설치

1. 아나콘다(Anaconda)설치

수학과 과학 분야에서 사용되는 여러 패키지들을 묶어 놓은 파이썬 배포판







Python 3.7 version(현재최신) [download]

- Anaconda.exe 파일 Install 중 all user(C드라이브안에 설치) / just me(사용자계정안에 설치) 선택
- Add Anaconda to my PATH enviroment variable 체크해제 ( 환경변수추가 : 기존파이선과 충돌가능성있음 - 체크해제권장)
- just me 선택시 C:\Users\[사용자명]\.anaconda 경로에 설치

2. Anaconda navigator 시작

- 실행이 무거워서 Prompt로 개발




3. Anaconda Prompt 실행







(base) C:\Users\사용자>conda --version #아나콘다 버전확인
conda 4.7.12

(base) C:\Users\사용자>python --version #파이썬 버전확인
Python 3.7.4

(base) C:\Users\사용자>conda info --envs #아나콘다 환경확인
# conda environments:
#
base                  *  C:\Users\사용자\Anaconda3


(base) C:\Users\사용자>conda create -n test python=3.5 #아나콘다 파이선 환경 3.5버전 만들기 
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\사용자\Anaconda3\envs\test

  added / updated specs:
    - python=3.5


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2018.8.24          |           py35_1         137 KB
    pip-10.0.1                 |           py35_0         1.6 MB
    python-3.5.6               |       he025d50_0        14.5 MB
    setuptools-40.2.0          |           py35_0         497 KB
    wheel-0.31.1               |           py35_0          82 KB
    wincertstore-0.2           |   py35hfebbdb8_0          14 KB
    ------------------------------------------------------------
                                           Total:        16.8 MB

The following NEW packages will be INSTALLED:

  certifi            pkgs/main/win-64::certifi-2018.8.24-py35_1
  pip                pkgs/main/win-64::pip-10.0.1-py35_0
  python             pkgs/main/win-64::python-3.5.6-he025d50_0
  setuptools         pkgs/main/win-64::setuptools-40.2.0-py35_0
  vc                 pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_0
  wheel              pkgs/main/win-64::wheel-0.31.1-py35_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py35hfebbdb8_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
python-3.5.6         | 14.5 MB   | ########################################################### | 100%
certifi-2018.8.24    | 137 KB    | ########################################################### | 100%
wincertstore-0.2     | 14 KB     | ########################################################### | 100%
wheel-0.31.1         | 82 KB     | ########################################################### | 100%
pip-10.0.1           | 1.6 MB    | ########################################################### | 100%
setuptools-40.2.0    | 497 KB    | ########################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) C:\Users\사용자>conda info --envs #아나콘다 환경확인
# conda environments:
#
base                  *  C:\Users\사용자\Anaconda3
test                     C:\Users\사용자\Anaconda3\envs\test


(base) C:\Users\사용자>conda activate test #아나콘다 환경활성화

(test) C:\Users\사용자>python --version #파이썬 버전확인
Python 3.5.6 :: Anaconda, Inc.

(test) C:\Users\사용자> 

>> conda create 가 안되는경우 해결방법

이상하게 집에서 테스트할때는 create 가 되지 않았다.

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
위의 상황일때 해결방법

conda config --set offline true     # offline에서 인스톨 가능하게...
conda config --set ssl_verify false # ssl 안 씀.
conda create -n basic python=3.6     # conda 환경 생성.


출처: https://bladewalker.tistory.com/712 [.]

>>window7 conda create 에러 해결방법

Solving environment: failed with repodata from current_repodata.json, will retry
 with next repodata source.
위와 같은 에러를 뱉어낸다.. 하.. ㅋㅋㅋㅋ 다시 밀고 설치해봐야징.


4. 아나콘다 환경삭제


 
conda deactivate #아나콘다 환경비활성화
conda remove --name test -all #이름이 test인 아나콘다 환경삭제


댓글

이 블로그의 인기 게시물

[파이썬] #2-모듈설치 및 스파이더(spyder)사용

[Tool-Tip] 에디트플러스에서 자동정렬기능 추가하기