본문 바로가기
Data scientist/Python

파이썬 python | 아나콘다 가상환경 32 Bit, 64 Bit 변경 해보기 Anaconda envs setting in 32 Bit, 64 Bit

by 작은벼리 2021. 6. 11.

 

조코딩 Youtube 주식 자동매매를 따라하다보니, 

대신증권 크레온 API 사용을 위해 파이썬을 32bit로 깔아야 하는게 불편할 것 같았다

그래서! 아나콘다 환경에서 32bit와 64bit로 각각 설치할 수 있는 방법을 리서치 해보았음 💻 

추후.. 또 까먹을 것 같아서 블로그에 저장 해봄! 

 

STEP.1 현재 플랫폼 확인

conda info라는 명령어를 쳐보면 몇 bit 버전을 쓰고 있는지 확인 가능 

#anaconda prompt 창에서 아래 명령어를 입력
conda info

 

STEP.2 bit로 변경 

# 32비트 환경 설정
set CONDA_FORCE_32BIT=1 

# 32비트, 파이썬 3.8 가상환경 생성 
conda create -n python38_32 python=3.8

# 64비트 환경 설정 
set CONDA_FORCE_64BIT=1

# 64비트, 파이썬 3.8 가상환경 생성 
conda create -n python38_64 python=3.8

 

STEP.3 2번이 안될경우! 

# 32 BIT 환경 설정하기 
conda config --env --set subdir win-32
conda info # 환경 변경된 것 확인! 

# 64 BIT 환경으로 되돌리기 
conda config --env --set subdir win-64
conda info # 환경 변경된 것 확인! 

 

 

참고 1: Programmersought, "Use anaconda to ensure 64-bit and 32-bit python coexistence, and how to install Python packages in 32 environments", https://www.programmersought.com/article/6753941572

참고 2: 퀀티랩 블로그, http://blog.quantylab.com/anaconda32env.html

참고3: 마이크로펀 블로그, https://blog.naver.com/PostView.nhn?blogId=microfun&logNo=222260480402&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView

댓글