高端网站开发培训价格,专做国外旅游的网站,vps网站建站助手,禹州做网站Ubuntu最好设置为英文#xff0c;我之前用中文在make的test的时候#xff0c;总是会有fail。
查了下有人怀疑是language的问题#xff0c;保险起见都用英文#xff0c;个人实践也证明改为英文就不报错了。
issue 44031: test_embed and test_tabnanny fails if the curre…Ubuntu最好设置为英文我之前用中文在make的test的时候总是会有fail。
查了下有人怀疑是language的问题保险起见都用英文个人实践也证明改为英文就不报错了。
issue 44031: test_embed and test_tabnanny fails if the current directory is non-ASCII - Python trackerhttps://bugs.python.org/issue44031 1.下载Python3.10.13
Python Release Python 3.10.13 | Python.orghttps://www.python.org/downloads/release/python-31013/得到Python-3.10.13.tgz 2.解压Python-3.10.13.tgz 3.进入Python-3.10.13目录打开终端
先安装依赖的包
很重要否则会在make install时出现make: *** [Makefile:1280: install] Error 1
installation - make: *** [Makefile:1280: install] Error 1 - Stack Overflowhttps://stackoverflow.com/questions/70848502/make-makefile1280-install-error-1
$ sudo apt install build-essential
$ sudo apt install libssl-dev libffi-dev libncurses5-dev zlib1g zlib1g-dev libreadline-dev libbz2-dev libsqlite3-dev make gcc再安装Python
$ ./configure --enable-optimizations
$ make
$ sudo make install 安装成功之后会提示一个pip相关信息且使用pip时会提示Command pip not found
WARNING: Running pip as the root user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
原因是 这意味着一个 Python 安装可能无法满足 每个应用程序的要求。如果应用程序 A 需要版本 1.0 的特定模块但应用程序 B 需要 2.0 版本然后 要求与安装 1.0 版或 2.0 版之间存在冲突 将使一个应用程序无法运行。 这个问题的解决方案是创建一个虚拟环境一个 包含 Python 安装的独立目录树 特定版本的 Python以及一些额外的包。 pip从版本10开始禁止在没有虚拟环境的情况下进行安装。
按照https://pip.pypa.io/warnings/venv的方式在项目目录新建 virtual environment 来使用pip
项目目录打开终端
为虚拟环境创建一个目录tutorial-env这个可以自己指定名字
python -m venv tutorial-env
激活
source tutorial-env/bin/activate
不想用了就关闭
deactivate