小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
运行wget http://fishros.com/install -O fishros && . fishros后 我的库都被卸掉了 环境乱了怎么办
-
@499051032 这是一键安装的原始命令:
mkdir -p /tmp/fishinstall/tools wget http://mirror.fishros.com/install/install.py -O /tmp/fishinstall/install.py 2>>/dev/null source /etc/profile if [ $UID -eq 0 ];then apt-get install sudo fi sudo apt install python3-distro python3-yaml -y sudo python3 /tmp/fishinstall/install.py sudo rm -rf /tmp/fishinstall/ sudo rm fishros . ~/.bashrc
去掉和安装相关的,就是 sudo apt install python3-distro python3-yaml -y 这句话了
你之前系统里有什么重要的软件库吗,没有就继续用一键安装安装剩下的了,我估计是python环境相关造成的
-
@小鱼 现在运行一键安装会报以下错误
wget http://fishros.com/install -O fishros && . fishros
--2024-08-02 11:04:44-- http://fishros.com/install
正在解析主机 fishros.com (fishros.com)... 47.119.165.169
正在连接 fishros.com (fishros.com)|47.119.165.169|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:http://fishros.com/install/ [跟随至新的 URL]
--2024-08-02 11:04:48-- http://fishros.com/install/
再次使用存在的到 fishros.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 579 [application/octet-stream]
正在保存至: “fishros”fishros 100%[===================>] 579 --.-KB/s 用时 0s
2024-08-02 11:04:48 (42.1 MB/s) - 已保存 “fishros” [579/579])
[sudo] gxx 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
python3-distro 已经是最新版 (1.7.0-1)。
python3-yaml 已经是最新版 (5.4.1-1ubuntu1)。
下列软件包是自动安装的并且现在不需要了:
apturl apturl-common blt debugedit default-libmysqlclient-dev dh-python
docutils-common docutils-doc evince-common evolution-data-server-common
fltk1.3-doc fluid fonts-lato freeglut3-dev gazebo9 gazebo9-common
gazebo9-plugin-base gedit-common gir1.2-accountsservice-1.0
gir1.2-dbusmenu-glib-0.4 gir1.2-dee-1.0 gir1.2-gck-1 gir1.2-gcr-3
gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0
gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-gtksource-3.0
gir1.2-gweather-3.0 gir1.2-javascriptcoregtk-4.0 gir1.2-keybinder-3.0
gir1.2-mutter-2 gir1.2-nm-1.0 gir1.2-nma-1.0 gir1.2-rsvg-2.0
gir1.2-unity-5.0 gir1.2-upowerglib-1.0 gir1.2-webkit2-4.0 gjs
gnome-keyring-pkcs11 gnome-shell-common gnome-themes-extra
gnome-themes-extra-data gnome-user-guide gtk2-engines-pixbuf hddtemp
hplip-data libapr1 libapr1-dev libaprutil1 libaprutil1-dev libargon2-0
libarmadillo-dev libarpack2-dev libart-2.0-2 libass9 libassimp-dev
libassimp4 libassuan-dev libavdevice-dev libavdevice57 libavfilter-dev
libavfilter6 libavformat-dev libavresample-dev libavresample3 libblas-dev
libboost-atomic-dev libboost-atomic1.65-dev libboost-atomic1.65.1
libboost-chrono-dev libboost-chrono1.65-dev libboost-container-dev
libboost-container1.65-dev libboost-container1.65.1 libboost-context-dev
libboost-context1.65-dev libboost-context1.65.1 libboost-coroutine-dev
libboost-coroutine1.65-dev libboost-coroutine1.65.1 libboost-date-time-dev
libboost-date-time1.65-dev libboost-date-time1.65.1 libboost-dev
libboost-exception-dev libboost-exception1.65-dev libboost-fiber-dev
libboost-fiber1.65-dev libboost-fiber1.65.1 libboost-filesystem-dev
libboost-filesystem1.65-dev libboost-graph-dev libboost-graph-parallel-dev
libboost-graph-parallel1.65-dev libboost-graph-parallel1.65.1
libboost-graph1.65-dev libboost-graph1.65.1 libboost-iostreams-dev
libboost-iostreams1.65-dev libboost-locale-dev libboost-locale1.65-dev
libboost-locale1.65.1 libboost-log-dev libboost-log1.65-dev
libboost-log1.65.1 libboost-math-dev libboost-math1.65-dev
libboost-math1.65.1 libboost-mpi-dev libboost-mpi1.65-dev libboost-mpi1.65.1
libboost-numpy-dev libboost-numpy1.65-dev libboost-numpy1.65.1
libboost-program-options-dev libboost-program-options1.65-dev
libboost-program-options1.65.1 libboost-python1.65.1 libboost-random-dev
libboost-random1.65-dev libboost-random1.65.1 libboost-regex-dev
libboost-regex1.65-dev libboost-regex1.65.1 libboost-serialization-dev
libboost-serialization1.65-dev libboost-serialization1.65.1
libboost-signals-dev libboost-signals1.65-dev libboost-signals1.65.1
libboost-stacktrace-dev libboost-stacktrace1.65-dev
libboost-stacktrace1.65.1 libboost-system-dev libboost-system1.65-dev
libboost-test-dev libboost-test1.65-dev libboost-test1.65.1
libboost-thread-dev libboost-thread1.65-dev libboost-timer-dev
libboost-timer1.65-dev libboost-timer1.65.1 libboost-tools-dev
libboost-type-erasure-dev libboost-type-erasure1.65-dev
libboost-type-erasure1.65.1 libboost-wave-dev libboost-wave1.65-dev
libboost-wave1.65.1 libboost1.65-dev libboost1.65-tools-dev libbs2b0
libbullet-dev libbullet2.87 libbz2-dev libcamel-1.2-61 libcamel-1.2-63
libccd-dev libccd2 libcharls1 libconsole-bridge-dev libconsole-bridge0.4
libdap-dev libdapserver7v5 libdc1394-22 libdc1394-22-dev libdee-1.0-4
libdrm-dev libebackend-1.2-10 libebook-contacts-1.2-2 libecal-1.2-19
libedataserver-1.2-23 libedataserver-1.2-26 libegl1-mesa-dev libeigen3-dev
libepsilon-dev libevdocument3-4 libevview3-3 libexif-dev libexif-doc
libflann-dev libflite1 libfltk-cairo1.3 libfltk-forms1.3 libfltk-gl1.3
libfltk-images1.3 libfltk1.3 libfltk1.3-dev libfreeimage-dev libfreeimage3
libfreexl-dev libfyba-dev libgail-3-0 libgazebo9 libgdal-dev libgdcm2-dev
libgdcm2.8 libgeos-dev libgeotiff-dev libgif-dev libgjs0g libgl1-mesa-dev
libgl2ps-dev libgles1 libgles2-mesa-dev libglu1-mesa-dev libglvnd-core-dev
libglvnd-dev libgnome-autoar-0-0 libgpg-error-dev libgpgme-dev
libgphoto2-dev libgraphviz-dev libgtksourceview-3.0-1
libgtksourceview-3.0-common libgts-dev libgutenprint2 libgvc6-plugins-gtk
libgweather-3-16 libgxps2 libhdf5-mpi-dev libhdf5-openmpi-dev libhwloc-dev
libibverbs-dev libignition-cmake-dev libignition-common
libignition-common-dev libignition-fuel-tools1-1 libignition-fuel-tools1-dev
libignition-math4 libignition-math4-dev libignition-msgs
libignition-msgs-dev libignition-transport4 libignition-transport4-dev
libilmbase-dev libimagequant0 libjbig-dev libjs-jquery-ui libjson-c-dev
libjsoncpp-dev libjxr0 libkeybinder-3.0-0 libkml-dev libkmlconvenience1
libkmlregionator1 libkmlxsd1 libkpathsea6 liblapack-dev liblept5
liblog4cxx-dev liblog4cxx10v5 liblz4-dev liblzma-dev libminizip-dev
libmozjs-52-0 libmozjs-91-0 libmutter-2-0 libmysofa0 libmysqlclient-dev
libnetcdf-cxx-legacy-dev libnorm1 libnuma-dev liboauth0 libogdi3.2-dev
libogg-dev libogre-1.9-dev libogre-1.9.0v5 libopenal-data libopenal-dev
libopenal1 libopencv-calib3d-dev libopencv-calib3d3.2 libopencv-contrib-dev
libopencv-contrib3.2 libopencv-core-dev libopencv-core3.2 libopencv-dev
libopencv-features2d-dev libopencv-features2d3.2 libopencv-flann-dev
libopencv-flann3.2 libopencv-highgui-dev libopencv-highgui3.2
libopencv-imgcodecs-dev libopencv-imgcodecs3.2 libopencv-imgproc-dev
libopencv-imgproc3.2 libopencv-ml-dev libopencv-ml3.2
libopencv-objdetect-dev libopencv-objdetect3.2 libopencv-photo-dev
libopencv-photo3.2 libopencv-shape-dev libopencv-shape3.2
libopencv-stitching-dev libopencv-stitching3.2 libopencv-superres-dev
libopencv-superres3.2 libopencv-ts-dev libopencv-video-dev
libopencv-video3.2 libopencv-videoio-dev libopencv-videoio3.2
libopencv-videostab-dev libopencv-videostab3.2 libopencv-viz-dev
libopencv-viz3.2 libopencv3.2-java libopencv3.2-jni libopenexr-dev
libopengl0 libopenjp2-7-dev libopenmpi-dev libopenni-dev libopenni2-dev
libpciaccess-dev libpcl-apps1.8 libpgm-5.2-0 libphonenumber7 libplymouth4
libpoco-dev libpococrypto50 libpocodata50 libpocodatamysql50
libpocodataodbc50 libpocodatasqlite50 libpocofoundation50 libpocojson50
libpocomongodb50 libpoconet50 libpoconetssl50 libpocoredis50 libpocoutil50
libpocoxml50 libpocozip50 libpoppler-dev libpoppler-glib8
libpoppler-private-dev libpoppler118 libpostproc-dev libpostproc54 libpq-dev
libproj-dev libprotobuf-dev libprotobuf-lite10 libprotobuf10 libprotoc-dev
libprotoc10 libpython-all-dev libpython-dev libpython2.7-dev
libpython3.6-dev libqhull-dev libqhull-r7 libqt5concurrent5 libqt5designer5
libqt5designercomponents5 libqt5help5 libqt5opengl5-dev
libqt5quickparticles5 libqt5quicktest5 libqt5quickwidgets5 libqt5sql5
libqt5sql5-sqlite libqt5test5 libqt5webkit5-dev libqt5xml5
libqtpropertybrowser4 libqwt-headers libqwt-qt5-6 libqwt-qt5-dev libraqm0
libraw1394-dev libraw1394-tools libraw16 librpmbuild8 librpmsign8
librubberband2 libruby2.5 libsctp-dev libsctp1 libsdformat6 libsdformat6-dev
libsdl2-2.0-0 libsimbody-dev libsimbody3.5v5 libsnmp-base libsocket++1
libspatialite-dev libspectre1 libspnav0 libsqlite0 libsqlite3-dev
libsuperlu-dev libswscale-dev libtar-dev libtar0 libtesseract4 libtheora-dev
libtiff-dev libtiff5-dev libtiffxx5 libtinyxml-dev libtinyxml2-6
libtinyxml2-dev libtracker-sparql-2.0-0 libunity-protocol-private0
libunity-scopes-json-def-desktop libunity9 liburdfdom-dev
liburdfdom-headers-dev liburdfdom-model liburdfdom-model-state
liburdfdom-sensor liburdfdom-world liburiparser-dev libusb-1.0-0-dev
libusb-1.0-doc libvtk6-java libvtk6-jni libwayland-bin libwayland-dev
libwebp-dev libwebp7 libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5 libx11-xcb-dev
libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
libxcb-randr0-dev libxcb-res0 libxcb-shape0-dev libxcb-sync-dev
libxcb-xfixes0-dev libxdot4 libxerces-c-dev libxml2-dev libxmu-dev
libxmu-headers libxshmfence-dev libxss-dev libxt-dev libxxf86vm-dev
libyaml-cpp-dev libyaml-cpp0.5v5 libyaml-dev libzeitgeist-2.0-0 libzip-dev
libzip4 libzmq3-dev libzmq5 libzzip-0-13 mesa-common-dev mpi-default-dev
mutter-common opencv-data p11-kit p11-kit-modules plymouth-label
printer-driver-gutenprint printer-driver-postscript-hp protobuf-compiler
python-matplotlib-data python2.7 python2.7-dev python2.7-minimal
python3-debconf python3-debian python3-gi-cairo python3-olefile
python3-pexpect python3-pil python3-ptyprocess python3-renderpm
python3-reportlab python3-reportlab-accel python3.6 python3.6-dev
python3.6-minimal qt5-assistant qt5-qmake qt5-qmake-bin qtbase5-dev
qtbase5-dev-tools qtchooser qtdeclarative5-dev qttools5-dev
qttools5-dev-tools qttools5-private-dev rake ros-melodic-angles
ros-melodic-cmake-modules ros-melodic-media-export
ros-melodic-qwt-dependency ros-melodic-ros-environment
ros-melodic-rosbag-migration-rule ros-melodic-rosboost-cfg
ros-melodic-roslint ros-melodic-roslz4 ros-melodic-smach ros-melodic-smclib
ros-melodic-urdf-parser-plugin rpm ruby ruby-did-you-mean ruby-minitest
ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5
rubygems-integration sbcl sdformat-sdf sgml-base sip-dev tango-icon-theme
tcl-dev tcl-vtk6 tcl8.6-dev tk-dev tk8.6-blt2.5 tk8.6-dev ttf-dejavu-core
unixodbc-dev update-notifier-common vim-gui-common vim-runtime vtk6
x11proto-composite-dev x11proto-core-dev x11proto-fixes-dev
x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev
x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xml-core
xwayland yaru-theme-gnome-shell
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 1176 个软件包未被升级。
有 5 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
正在设置 update-notifier-common (3.192.54) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
File "/usr/lib/python3/dist-packages/debian/deb822.py", line 78, in <module>
class TagSectionWrapper(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'
dpkg: 处理软件包 update-notifier-common (--configure)时出错:
已安装 update-notifier-common 软件包 post-installation 脚本 子进程返回错误状态 1
正在设置 udev (249.11-0ubuntu3) ...
正在设置 plymouth (0.9.5+git20211018-1ubuntu3) ...
正在安装新版本配置文件 /etc/init.d/plymouth ...
正在安装新版本配置文件 /etc/init.d/plymouth-log ...
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
正在设置 plymouth-theme-ubuntu-text (0.9.5+git20211018-1ubuntu3) ...
update-initramfs: deferring update (trigger activated)
正在设置 plymouth-label (0.9.5+git20211018-1ubuntu3) ...
正在处理用于 initramfs-tools (0.130ubuntu3.13) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=ef6f95bd-e079-40e9-842c-876adfa4d847)
I: Set the RESUME variable to override this.
正在处理用于 ureadahead (0.100.0-21) 的触发器 ...
在处理时有错误发生:
update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
--2024-08-02 11:05:52-- http://mirror.fishros.com/install/tools/base.py
正在解析主机 mirror.fishros.com (mirror.fishros.com)... ^CTraceback (most recent call last):
File "/tmp/fishinstall/install.py", line 124, in <module>
main()
File "/tmp/fishinstall/install.py", line 59, in main
from tools.base import CmdTask,FileUtils,PrintUtils,ChooseTask,ChooseWithCategoriesTask
ImportError: cannot import name 'CmdTask' from 'tools.base' (/tmp/fishinstall/tools/base.py)
bash: /opt/ros/melodic/setup.bash: 没有那个文件或目录 -
@499051032 在 运行wget http://fishros.com/install -O fishros && . fishros后 我的库都被卸掉了 环境乱了怎么办 中说:
)... ^CTraceback (most recent
这里的Ctrl+C是你输入的吗,继续等待就好了
-
好的 我想发一下我的那个报错的信息,我复制在一个文件里了,看看能不能发给你,这台电脑的东西比较重要,想给你看看到底发生了啥子
-
@小鱼 又报了错 安装失败了。。
[-]Result:success r Debiandevelopment files)trainedRun CMD Task:[sudo apt install aptitude -y]
[-]Result:code:100 1.6.13 正要被安装要的软件Run CMD Task:[sudo apt search aptitude ]
[-]Result:success r Debiandevelopment files)trainedRun CMD Task:[sudo apt install aptitude -y]
[-]Result:code:100 1.6.13 正要被安装要的软件Run CMD Task:[sudo apt install ros-melodic-desktop-full -y]
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:下列软件包有未满足的依赖关系:
libboost-mpi-python1.65.1 : 依赖: python3 (< 3.7) 但是 3.10.4-0ubuntu2 正要被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
Run CMD Task:[sudo apt install ros-melodic-desktop-full -y]
[-]Result:code:100 (< 3.7) 但是 3.10.4-0ubuntu2 正要被安装============================================================
请注意我,检测你在安装过程中出现依赖问题,请在稍后输入n,再选择y,即可解决(若无法解决,清在稍后手动运行命令: sudo aptitude install ros-melodic-desktop-full)
确认了解情况,请输入回车继续安装
Run CMD Task:[sudo aptitude install ros-melodic-desktop-full]
sudo: aptitude:找不到命令
Run CMD Task:[sudo aptitude install ros-melodic-desktop-full -y]
[-]Result:code:1Run CMD Task:[sudo apt search python-catkin-tools ]
[-]Result:success kin.Run CMD Task:[sudo apt install python-catkin-tools -y]
[-]Result:code:100 -2) 但是 3.12-1build2 正要被安装装装Run CMD Task:[sudo apt search python-rosdep ]
[-]Result:success for Robot OS (Python 2)Run CMD Task:[sudo apt install python-rosdep -y]
[-]Result:code:100 -2) 但是 3.12-1build2 正要被安装装装Run CMD Task:[ls /opt/ros/melodic/setup.bash]
[-]Result:code:2安装失败了,请打开鱼香社区:https://fishros.org.cn/forum 在一键安装专区反馈问题...
Run CMD Task:[ls /opt/ros/melodic/setup.bash]
[-]Result:code:2欢迎加入机器人学习交流QQ群:438144612(入群口令:一键安装)
鱼香小铺正式开业,最低499可入手一台能建图会导航的移动机器人,淘宝搜店:鱼香ROS 或打开链接查看:https://item.taobao.com/item.htm?id=696573635888
如在使用过程中遇到问题,请打开:https://fishros.org.cn/forum 进行反馈 -
@499051032 sudo apt update 看看
另外检查下 python 的版本:python --version
-
@小鱼 sudo apt update
[sudo] gxx 的密码:
正在读取软件包列表... 完成
E: 无法获得锁 /var/lib/apt/lists/lock。锁正由进程 2867(apt)持有
N: 请注意,直接移除锁文件不一定是合适的解决方案,且可能损坏您的系统。
E: 无法对目录 /var/lib/apt/lists/ 加锁 -
@499051032 在 运行wget http://fishros.com/install -O fishros && . fishros后 我的库都被卸掉了 环境乱了怎么办 中说:
。锁正由进程 2867(apt)持有
有什么终端开着没关,正在用apt吗
-
@小鱼 python --version
Python 3.7.6 -
@499051032 Ubuntu 18.04的默认Python版本是Python 3.6
-
@小鱼 sudo apt update
命中:1 https://mirrors.ustc.edu.cn/ubuntu bionic InRelease
命中:2 https://mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease
命中:3 https://mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease
命中:4 https://mirrors.ustc.edu.cn/ubuntu bionic-security InRelease
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
有 208 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们确实是终端没关
-
@小鱼 我应该怎么做,ros目前文件还保留在/opt/ros/melodic,但是里面的setup.bash没了
-
此回复已被删除! -
此回复已被删除! -
@499051032 先解决python默认版本问题,ubuntu18.04 修改python3默认版本为python3.6,用超链接方式 @小伊 提供下方法
-
@499051032 你的问题是一开始修改掉了系统默认的python3版本,导致一些系统命令不能用,而一键安装依赖这些命令,就在启动的时候删掉了
-
在Ubuntu 18.04中,默认安装的Python 3版本可能是Python 3.6(具体取决于你安装Ubuntu时的情况),但也可能安装了更高版本的Python 3(如Python 3.7或3.8)。如果你想确保Python 3的默认版本是Python 3.6,并且希望使用超链接的方式提供步骤(尽管这里主要是文本描述,但我会尽量详细),你可以按照以下步骤操作:
步骤 1: 安装Python 3.6(如果尚未安装)
首先,你需要确保Python 3.6已经安装在你的系统上。Ubuntu 18.04的默认软件源中通常包含Python 3.6,因此你可能只需要通过
apt
来安装或确认它已安装。sudo apt update sudo apt install python3.6
注意:如果Python 3.6已经安装,
apt
会告诉你它是最新的版本或者已经安装。步骤 2: 设置Python 3.6为默认的Python 3版本
Ubuntu 使用
update-alternatives
系统来管理多个版本的软件。你可以使用这个系统来设置Python 3.6作为默认的Python 3版本。-
查看当前Python 3的版本(可选步骤,用于确认当前设置)
update-alternatives --display python3
这将列出所有已安装的Python 3版本及其优先级。
-
设置Python 3.6的优先级
你需要给
python3.6
一个比当前默认版本更高的优先级。首先,你需要找到python3.6
的完整路径(通常位于/usr/bin/python3.6
),然后使用update-alternatives
来配置它。sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
这里的
1
是优先级,你可以根据需要调整这个值,但要确保它比其他版本的优先级高。 -
再次检查Python 3的默认版本
python3 --version
如果一切设置正确,这应该显示
Python 3.6.x
。
注意事项
- 修改默认Python版本可能会影响依赖特定Python版本的系统工具和库。在继续之前,请确保这不会对你的系统或你正在运行的应用程序造成负面影响。
- 某些软件包管理器(如pip)也可能随Python版本一起安装,并且可能指向特定版本的Python。例如,
pip3
可能默认指向与python3
相同的Python版本。如果你修改了默认Python版本,你也可能需要相应地调整pip的指向。
以上步骤应该能帮助你在Ubuntu 18.04上设置Python 3.6为默认的Python 3版本。由于直接提供超链接在这里不适用(因为这是一个文本描述),希望这些步骤足够清晰。
以上为生成回答,仅供参考~
-
-
@小鱼 好的好的 感谢 我现在依照您给的方法尝试一下
-
@小鱼 我按照指示操作 结果是这样子,我设置了python3.6为最高优先级,但是还是显示python3.7
gxx@gxx-System-Product-Name:/usr/bin$ update-alternatives --display python3
python3 - 自动模式
最佳链接版本为 /usr/bin/python3.6
链接目前指向 /usr/bin/python3.6
链接 python3 指向 /usr/bin/python3
/usr/bin/python3.6 - 优先级 1
gxx@gxx-System-Product-Name:/usr/bin$ python --version
Python 3.7.6 -
@499051032 在 运行wget http://fishros.com/install -O fishros && . fishros后 我的库都被卸掉了 环境乱了怎么办 中说:
链接 python3 指向 /usr/bin/python3
手动链接到python3.6 呗