likes: 0
>> back to All Articles
Untitled
Pythonでは,Python自体のバージョンはmiseで管理.(pyenvは不要)
グローバルにはmise use -g python,プロジェクトごとでは -gオプションなしで.
プロジェクトの.tool-versionsファイルにinstallすると書かれる.そして mise install でそこの内容を全てインストールできる(pip install -r requirements.txtと同じ感覚)
パッケージはvenv (pythonインストール時にvenvは一緒にあるらしい)で管理.
venvは py -m venv .venvで作ってsource .venv/bin/activate する(プロンプトに.venv表示される).venv使わない場合はdeactivateしてグローバル化する.
https://www.python.jp/install/windows/venv.html
https://www.youtube.com/watch?app=desktop&v=r4SkIhQThe0&ab_channel=PythonプログラミングVTuberサプー this is newer than the above.
https://qiita.com/bluesDD/items/b7c56d6d7ecf2b300314#7-仮想環境を削除する
py -m venv {virtual-env-name( .venv etc )}
-m means execute python-module
source {virtual-env-name}/bin/activate
activate the virtual-env
https://www.youtube.com/watch?app=desktop&v=r4SkIhQThe0&ab_channel=PythonプログラミングVTuberサプー
pyenv install —list
list up all versions available by pyenv
pyenv install {specified verision}
pyenv versions
list up installed versions
pyenv global {specified version}
activate specified python version
when you can’t change python version
→ use ‘where pyenv’ instead of ‘which pyenv’ (if which pyenv shows shell-function)
https://qiita.com/ShiroUz/items/7e037a6f482ddf742834
https://hitori-sekai.com/python/error-pyenv/#google_vignette
https://qiita.com/lvn-awano/items/f6c313bddaa02a8d2e22
>> back to All Articles