python 개발을 하다 보면
일부 모듈이나 패키지가 특정 Python 버전만 지원하는 경우가 있습니다.
이번에 zipline 을 설치하려고 하니 python 2.7 , python 3.5 만 지원이 된다고 나와있습니다.
https://github.com/quantopian/zipline
quantopian/zipline
Zipline, a Pythonic Algorithmic Trading Library. Contribute to quantopian/zipline development by creating an account on GitHub.
github.com
현재 python 3.7 을 사용하고 있기 때문에 python 3.5의 개발환경 구축이 필요합니다.
1. simple python Version Management: pyenv 를 설치합니다.
$ brew update
$ brew install pyenv
2. bash_profile 에 pyenv init을 추가합니다.
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
$ source ~/.bash_profile
3. python 3.5를 설치합니다.
// 설치 가능한 버전을 보여줍니다.
$ pyenv install --list
// 3.5.4버전의 python을 설치합니다.
$ pyenv install 3.5.4
$ pyenv versions
* system (set by /Users/gamto/.pyenv/version)
3.5.4
4. python 버전 선택
// python 3.5.4 버전 설정
$ pyenv global 3.5.4
$ pyenv versions
system
* 3.5.4 (set by /Users/gamto/.pyenv/version)
$ python -V
Python 3.5.4
최종적으로 python 버전이 3.5.4로 설정이 되는 것을 확인 할 수 있습니다.
'IT&DEV - IT & 개발' 카테고리의 다른 글
[OMV6]Docker - Nginx Proxy Manager 설치 (0) | 2023.03.31 |
---|---|
[OMV6]Portainer Docker Network 설정 (0) | 2023.03.29 |
CICD란? CI/CD (Continuous Integration and Continuous Deployment/Delivery) (0) | 2023.03.28 |
Mac Python3 설치 (0) | 2019.09.08 |
Mac Homebrew 설치 (0) | 2019.09.08 |
댓글