文章内容
2021/5/1 10:35:32,作 者: 黄兵
The virtual environment was not created successfully because ensurepip is not available.
今天再Ubuntu 18.04安装Python虚拟环境的时候出现如下提示:
The virtual environment was not created successfully because ensurepip is not available.
On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv package, recreate your virtual environment.
解决方案:
刚才我安装了Python3.9版本,具体步骤,可以参考这里:Ubuntu18.04 安装 Python3.9。所以需要安装3.9的虚拟环境,具体执行如下命令:
sudo apt-get install python3.9-venv
之后参考这篇文章安装,继续安装虚拟环境,文章地址:Ubuntu 18.04 安装Python虚拟环境
参考资料:
could not build the server_names_hash, you should increase server_names_hash_bucket_size
Ubuntu18.04 安装 Python3.9
Ubuntu18.04 安装 Python3.9
评论列表