기본 콘텐츠로 건너뛰기

Pyenv 에서 System 에서 사용하도록 Python 버전 설정하기

Pyenv 에서 System 에서 사용하도록 Python 버전 설정하기


node 나 npm 을 설치하고 npm install 시 python 버전이 맞지 않아 에러가 나는 경우가 있다
이럴때 pyenv 로 버전을 명시하여 사용 할 수 있음


$ pyenv

pyenv 2.3.19

Usage: pyenv <command> [<args>]


Some useful pyenv commands are:

   --version   Display the version of pyenv

   commands    List all available pyenv commands

   exec        Run an executable with the selected Python version

   global      Set or show the global Python version(s)

   help        Display help for a command

   hooks       List hook scripts for a given pyenv command

   init        Configure the shell environment for pyenv

   install     Install a Python version using python-build

   latest      Print the latest installed or known version with the given prefix

   local       Set or show the local application-specific Python version(s)

   prefix      Display prefixes for Python versions

   rehash      Rehash pyenv shims (run this after installing executables)

   root        Display the root directory where versions and shims are kept

   shell       Set or show the shell-specific Python version

   shims       List existing pyenv shims

   uninstall   Uninstall Python versions

   version     Show the current Python version(s) and its origin

   version-file   Detect the file that sets the current pyenv version

   version-name   Show the current Python version

   version-origin   Explain how the current Python version is set

   versions    List all Python versions available to pyenv

   whence      List all Python versions that contain the given executable

   which       Display the full path to an executable


  • Shell 에서 사용하기 위해서는 아래의 명령어를 실행

$ pyenv shell 3.10.12 2.7.18 


  • global 에서 사용하기

$ pyenv global 3.10.12 2.7.18 


  • 세팅 확인

$ pyenv version

  system

* 2.7.18 (set by PYENV_VERSION environment variable)

  3.8.17

* 3.10.12 (set by PYENV_VERSION environment variable)

댓글

이 블로그의 인기 게시물

Message Queue 란 무엇인가

Message Queue 란 무엇인가?? 메시지 지향 미들웨어(Meesage Oriented Middleware: MOM)은 비동기 메시지를 사용하는 다른 응용 프로그램 사이에서 데이터 송수신을 의미 MOM을 구현한 시스템을 메시지 큐(MessageQueue: MQ)라 함 Producer(sender) 가 메시지를 큐에 전송하면 Consumer(receiver) 가 처리하는 방식으로, producer 와 consumer 에 message 프로세스가 추가되는 것이 특징 메시지 큐의 장점 비동기(Asynchronous): Queue에 넣기 때문에 나중에 처리할 수 있습니다. 비동조(Decoupling): 애츨리케이션과 분리할 수 있습니다. 탄력성(Resilience): 일부가 실패 시 전체에 영향을 받지 않습니다. 과잉(Redundancy): 실패할 경우 재실행 가능합니다. 보증(Guarantees): 작업이 처리된걸 확인할 수 있습니다. 확장성(Scalable): 다수의 프로세스들이 큐에 메시지를 보낼 수 있습니다. 메시지 큐 종류 Apache ActiveMQ, Apache Kafka, Apache Qpid, Apache RocketMQ, Beanstalkd, Enduro/X, HTTPSQS, JBoss Messaging, JORAM, RabbitMQ, Sun Open Message Queue, and Tarantool 등 Apache ActiveMQ Java Message Service (JMS)를 사용하는 오픈소스 MQ Java, C, C ++, C #, Ruby, Perl, Python, PHP 등 다양한 크로스 언어 클라이언트 및 프로토콜 지원 Spring 지원으로 Spring xml config 메커니즘 이용 가능 JDBC 지원으로 DB 높은 퍼포먼스 가능 높은 퍼포먼스를 위해 클러스터링 구성 가능 Restful API 제공 단 모니터링 도구제공하지 않음 ...