관리 메뉴

NineTwo meet you

[🍎 Mac OS M1 환경설정] pyenv & poetry 설치 본문

환경설정

[🍎 Mac OS M1 환경설정] pyenv & poetry 설치

NineTwo 2024. 2. 10. 22:20
반응형

pyenv

다양한 버전의 파이썬을 관린하는 툴로서 파이썬 프로젝트를 만들때 새로운 파이썬 프로젝트마다 파이썬을 다운로드 해야하는 불편함을 덜어준다.

$ brew install pyenv

poetry

파이썬의 패키지 의존성을 관리하기 위한 라이브러리다.

$ curl -sSL https://install.python-poetry.org | python3 -

 

근데,,  symlinks 에러가 발생하면서 설치가 안된다면 사용하는 shell 에 따라 다음과 같이 확인 해보기..!

This build of python cannot create venvs without using symlinks

방법 1) bash

brew install pyenv
pyenv install 3.10.5
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile

방법 2) zsh

brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.zshrc
pyenv install 3.10.5
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile

 

그래도 안된다면,,?

$ brew install peorty

 

[참고]

https://github.com/python-poetry/install.python-poetry.org/issues/52

 

Install on MacOs fails with Exception: This build of python cannot create venvs without using symlinks · Issue #52 · python-po

Python version: 3.9.6 OS version and name: macOS 12.6 I am on the latest stable Poetry version, installed using a recommended method. I have searched the issues of this repo and believe that this i...

github.com

https://stackoverflow.com/questions/73805879/poetry-installation-failing-on-mac-os-says-should-use-symlinks

 

poetry installation failing on Mac OS, says "should_use_symlinks"

I am trying to install poetry using the following command curl -sSL https://install.python-poetry.org | python3 - but it is failing with the following exception: Exception: This build of python ca...

stackoverflow.com

 

반응형

'환경설정' 카테고리의 다른 글

[🍎 Mac OS M1 환경설정] Docker 설치 & 완전 삭제  (0) 2024.02.13
Comments