我已经使用 pyenv 近两年了,在运行 RHEL 8.3(Linux 内核 4.18)和 X11 模式下的 Gnome 3.32.2 的系统上没有出现任何问题。我主要使用鱼壳,但偶尔也会使用 bash,直到现在都可以与 pyenv 一起使用。但是,在pyenv update大约 24 小时前运行后,使用该pyenv activate命令激活我创建的虚拟环境之一不再设置路径以使用我在该虚拟环境中安装的内容。
当我开始终端会话时,我看到一条新消息:
WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.
Run Code Online (Sandbox Code Playgroud)
所以我跑了pyenv init它告诉我:
# Add pyenv executable to PATH by adding
# the following to ~/.profile:
set -Ux PYENV_ROOT $HOME/.pyenv
set -Ux fish_user_paths $PYENV_ROOT/bin $fish_user_paths
# Load pyenv automatically by appending
# the following …Run Code Online (Sandbox Code Playgroud) 我正在尝试在全新安装的Ubuntu Server 14.04上为Python 3.4创建虚拟环境.我按照venv模块的说明进行操作:
https://docs.python.org/3/library/venv.html#module-venv
我没有很多Python 3.4或Ubuntu的经验.
当我输入命令时:
pyvenv testDir
Run Code Online (Sandbox Code Playgroud)
我回来了:
pyvenv: command not found
Run Code Online (Sandbox Code Playgroud)
是什么造成的?