Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在debian 10上使用checkinstall安装python3.8?_Python_Linux_Debian_Debian Buster_Checkinstall - Fatal编程技术网

如何在debian 10上使用checkinstall安装python3.8?

如何在debian 10上使用checkinstall安装python3.8?,python,linux,debian,debian-buster,checkinstall,Python,Linux,Debian,Debian Buster,Checkinstall,我已经在服务器上安装了debian 10 PRETTY_NAME="Debian GNU/Linux 10 (buster)" ID=debian arch: x86_64 它安装了python版本3.7.3,所以我尝试将它更新到版本3.8.5,我想使用checkinstall。。 我在sources.list和install中添加backports repo检查安装: 安装检查安装 sudoapt安装checkinstall sudoapt更新 然后我得到python:

我已经在服务器上安装了debian 10

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
ID=debian
arch: x86_64
它安装了python版本3.7.3,所以我尝试将它更新到版本3.8.5,我想使用checkinstall。。 我在sources.list和install中添加backports repo检查安装:

安装检查安装 sudoapt安装checkinstall sudoapt更新 然后我得到python:

在tar.xz中下载python cd/opt 旋度-Ohttps://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz tar-xf Python-3.8.5.tar.xz cd Python-3.8.5 但是当我尝试这个的时候

/配置-启用优化 制作 为目标和管道到外壳脚本使用make上的-n标志 生成-n altinstall>altinstall_script.sh 使用该shell脚本运行checkinstall chmod+x altinstall_script.sh 安装 sudo checkinstall./altinstall_script.sh-安装 我得到一个错误:

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm                                                           
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           

running build_scripts
copying and adjusting /opt/Python-3.8.5/Tools/scripts/pydoc3 -> build/scripts-3.8
copying and adjusting /opt/Python-3.8.5/Tools/scripts/idle3 -> build/scripts-3.8
copying and adjusting /opt/Python-3.8.5/Tools/scripts/2to3 -> build/scripts-3.8
changing mode of build/scripts-3.8/pydoc3 from 644 to 755
changing mode of build/scripts-3.8/idle3 from 644 to 755
changing mode of build/scripts-3.8/2to3 from 644 to 755
renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8
running install_lib
copying build/lib.linux-x86_64-3.8/_multibytecodec.cpython-38-x86_64-linux-gnu.so -> /usr/local/lib/python3.8/lib-dynload
error: [Errno 2] No such file or directory
rm: cannot remove '/usr/local/lib/python3.8/lib-dynload/_sysconfigdata__linux_x86_64-linux-gnu.py': No such file or directory
rm: cannot remove '/usr/local/lib/python3.8/lib-dynload/__pycache__': No such file or directory
Creating directory /usr/local/share/man/man1
Looking in links: /tmp/tmpaf3jv392
Processing /tmp/tmpaf3jv392/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmpaf3jv392/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory

C

我认为您在列出要安装的版本时犯了一个错误,请参阅本指南以了解更多信息-


添加这段代码应该会有所帮助。

我认为您在列出要安装的版本时犯了一个错误,请参阅本指南以了解更多信息-


添加这段代码应该会有所帮助。

这似乎对我很有用:安装pyenv并将其用于安装python3.8.5

我运行了以下命令:

安装pyenv 旋度-Lhttps://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer |猛击 通过将以下内容添加到~/.bashrc自动加载pyenv: 导出路径=$HOME/.pyenv/bin:$PATH eval$pyenv init- eval$pyenv virtualenv init- 检查版本 pyenv安装-列表| grep3\[678] 安装python 3.8.5 pyenv安装-v3.8.5 将python设置为3.8.5 pyenv global 3.8.5 现在我可以使用python2和python3了 python2-V->python2.7.16 python3-V->python3.8.5 python-V->python 3.8.5 pip-V->pip 20.1.1 from/root/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip-python 3.8 pip2-V->pip20.2.1 from/root/.local/lib/python2.7/site-packages/pip-python2.7 pip3-V->pip 20.1.1 from/root/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip-python 3.8 或者返回到系统python pyenv全球系统 然后 python2-V->python2.7.16 python-V->Python2.7.16 python3-V->python3.8.5 和版本 pyenv版本 也许,您还需要安装依赖项:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev

这似乎对我有用:安装pyenv并将其用于安装python3.8.5

我运行了以下命令:

安装pyenv 旋度-Lhttps://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer |猛击 通过将以下内容添加到~/.bashrc自动加载pyenv: 导出路径=$HOME/.pyenv/bin:$PATH eval$pyenv init- eval$pyenv virtualenv init- 检查版本 pyenv安装-列表| grep3\[678] 安装python 3.8.5 pyenv安装-v3.8.5 将python设置为3.8.5 pyenv global 3.8.5 现在我可以使用python2和python3了 python2-V->python2.7.16 python3-V->python3.8.5 python-V->python 3.8.5 pip-V->pip 20.1.1 from/root/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip-python 3.8 pip2-V->pip20.2.1 from/root/.local/lib/python2.7/site-packages/pip-python2.7 pip3-V->pip 20.1.1 from/root/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip-python 3.8 或者返回到系统python pyenv全球系统 然后 python2-V->python2.7.16 python-V->Python2.7.16 python3-V->python3.8.5 和版本 pyenv版本 也许,您还需要安装依赖项:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev

预装:Python 2.7.16、Python 3.7.3、pip 20.2.1 from/root/.local/lib/python2.7/site-packages/pip-python2.7、pip 20.2.1 from/root/.local/lib/python3.7/site-packages/pip-python3.7预装:Python 2.7、Python 3.7、pip 20.2.1 from/root/.local/lib/python2.7/site-packages/pip-python2.7、,来自/root/.local/lib/python3.7/site-packages/pip-python 3.7./configure的pip 20.2.1;制作makeinstall很糟糕,因为除非开发人员提供了卸载目标,或者您提供了要配置的前缀,否则很难撤消,因此所有已安装的文件都隐藏在文件系统的一个整洁的角落中。你应该改用checkinstall…还有python3.8-版本不适合我:bash:python3.8:找不到命令。/configure;制作makeinstall很糟糕,因为除非开发人员提供了卸载目标,或者您提供了要配置的前缀,否则很难撤消,因此所有已安装的文件都隐藏在文件系统的一个整洁的角落中。应该改用checkinstall…还有python3.8-版本不适用于我:bash:python3.8:找不到命令