pyenv

pyenv: python :command not found

时光总嘲笑我的痴心妄想 提交于 2020-12-06 12:13:07
问题 I want to use Python3 with pyenv. $ pyenv root /Users/asari/.pyenv $ pyenv versions system 2.7.15 3.6.2 3.6.3 3.6.4 * 3.6.6 (set by /Users/asari/workspace/hoge/.python-version) $ python -V pyenv: python: command not found The `python' command exists in these Python versions: 2.7.15 but, python command not found. I read it in .pyenv/shims/python , thought that there was not python in .pyenv/versions/3.6.6/bin/ , but I did not know why python was missing. $ pwd /Users/asari/.pyenv/versions/3.6

Linking pyenv python to homebrew in order to avoid homebrew python@3.8 installation

末鹿安然 提交于 2020-12-03 05:59:43
问题 Some packages from brew require python@3.8 as a dependency. For example: $ brew deps vim gdbm gettext libyaml lua openssl@1.1 perl python@3.8 readline ruby sqlite xz However, I want to manage all my python installations with pyenv and I would not like to download python@3.8 with brew. This would imply having to exactly same versions of python installed in 2 different locations, which I would like to avoid. Reading up on brew, pyenv and python I´ve come to understand that having python

Linking pyenv python to homebrew in order to avoid homebrew python@3.8 installation

佐手、 提交于 2020-12-03 05:57:11
问题 Some packages from brew require python@3.8 as a dependency. For example: $ brew deps vim gdbm gettext libyaml lua openssl@1.1 perl python@3.8 readline ruby sqlite xz However, I want to manage all my python installations with pyenv and I would not like to download python@3.8 with brew. This would imply having to exactly same versions of python installed in 2 different locations, which I would like to avoid. Reading up on brew, pyenv and python I´ve come to understand that having python

Installing anaconda with pyenv, unable to configure virtual environment

我只是一个虾纸丫 提交于 2020-11-30 03:49:47
问题 I am using pyenv to manage python installations and virtual environments - and I would like anaconda to be one such installation, and to be able to create virtual environments using anaconda python. Using pyenv install anaconda3-2019.03 successfully installs and I can activate the version with pyenv global anaconda3-2019.03 : SamLee-PC:~ max$ pyenv versions system 2.7.10 2.7.10/envs/flask_tutorial * 3.7.4 (set by /Users/max/.pyenv/version) 3.7.4/envs/learning_python 3.7.4/envs/microblog 3.7.4

使用 pyenv 管理 Python 版本

巧了我就是萌 提交于 2020-11-14 12:23:39
pyenv 通过系统修改环境变量来实现 Python 不同版本的切换。 pyenv 的美好之处在于,它并没有使用将不同的 PATH植入不同的shell这种高耦合的工作方式,而是简单地在PATH 的最前面插入了一个垫片路径(shims):~/.pyenv/shims:/usr/local/bin:/usr/bin:/bin。所有对 Python 可执行文件的查找都会首先被这个 shims 路径截获,从而使后方的系统路径失效。 1 安装 pyenv 的最新版本至 ~/.pyenv 目录(其他目录也行) git clone https://github.com/pyenv/pyenv.git ~/.pyenv 2 在 ~/.bash_profile 中添加三行指令,让系统可以找到 pyenv 安装的 Python 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 3 重启你的 shell

Linux安装Python

送分小仙女□ 提交于 2020-11-13 01:58:40
一:linux系统安装python程序  1.下载安装gcc: yum install gcc  2.安装python3.x可能使用到的依赖: yum install openssl-devel bizp2-devel expat-devel gdbm-devel readline-devel sqlite-devel libffi-devel  3.下载python3.x:(并解压) wget https: // www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz -----命令下载或者在官网下载源码包  4.移动python3.x至/usr/local: [root@localhost python]# mv Python- 3.7 . 3 /usr/local  5.旧版本python依赖 : [root@localhost local]# ll /usr/bin | grep python -----查询依赖  6.编译安装python3.x :(进入usr/bin/python3目录) [root@localhost Python- 3.7 . 3 ]# ./ configure [root@localhost Python - 3.7 . 3 ]# make [root@localhost Python - 3.7 . 3

22款终端生产力工具,效率飞起!

随声附和 提交于 2020-10-29 17:43:42
译文:switowski.com/blog/favorite-cli-tools 程序员在搞开发时, 终端CLI工具 的使用必不可少,往往都是 生产力工具 ,所以今天在此给大家推荐一下比较好用的终端工具。先给大家列个 推荐清单 ,如下图。 高频 CLI 工具推荐 1、fish shell 毋庸置疑,在终端工具中,Shell 是使用最频繁也最重要的工具。过去,我曾经使用过 Bash 和 Z Shell,而如今,这个Fish Shell,也是一个非常优秀的终端 Shell 工具,拥有许多开箱即用的功能,例如语法自动推荐补全、语法高亮显示或使用快捷键在最近访问的文件夹之间来回切换。 下载地址:https://fishshell.com/ 2、Starship 如果必须要从本篇文章中选择一个我最喜欢的终端工具——那非 Starship 莫属。Starship 可以适用于任何 Shell。你只需要安装它,然后在相应的配置文件.bashrc/.zshrc/config.fish添加一行配置,剩下的工作交给它来完成就好了。 它可以做到: 根据你是否在代码仓库中添加了新文件、是否修改了文件、是否暂存了文件等情况,用相应的符号表示 git 仓库的状态。 根据你所在的 Python 项目目录,展示 Python 的版本号,这也适用于 Go/Node/Rust/Elm 等其他编程语言环境。