精华内容
下载资源
问答
  • 卸载python2.7

    千次阅读 2020-03-06 13:42:39
    Windows中python2.7卸载方法: 1、打开“控制面板”-“程序与功能”,找到 python2.7.14,然后右键-卸载 这里写图片描述 2、卸载完成后到python的安装目录,比如本系列教程安装在C盘,去C盘看一下 Python27文件夹...

    Windows中python2.7的卸载方法:
    1、打开“控制面板”-“程序与功能”,找到 python2.7.14,然后右键-卸载
    这里写图片描述
    2、卸载完成后到python的安装目录,比如本系列教程安装在C盘,去C盘看一下 Python27文件夹是否还存在,如果存在删除即可,如果不存在说明已经卸载完成了。因为python不同的版本,结果不太一样,有的python版本能直接卸载干净,有的则需要手动去删除一下安装文件夹
    3、在python学习中安装的时候设置的环境变量这时也需要手动去删除一下,当然不删除也没有大问题,只是如果反复安装多次,会造成安装python不需要设置环境变量的错误,实质是因为在之前的某次安装你将环境变量设置好了,卸载的时候没有删除,这样在你下次安装的时候而且同一个版本的时候会有这种错觉。

    原文链接

    展开全文
  • On my Fedora11 machine which has python2.6 pre-installed on it, I was able to successfully install python 2.7 using the following steps:wget ...

    1586010002-jmsa.png

    On my Fedora11 machine which has python2.6 pre-installed on it, I was able to successfully install python 2.7 using the following steps:

    wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2

    tar -xvjf Python-2.7.tar.bz2

    cd Python*

    ./configure --prefix=/opt/python27

    make

    make install

    vi ~/.bash_profile

    ## replaced PATH=$PATH:$HOME/bin

    ## with PATH=$PATH:$HOME/bin:/opt/python27/bin

    ## reload .bash_profile

    source ~/.bash_profile

    echo "/opt/python27/lib" > /etc/ld.so.conf.d/python27.conf

    ldconfig

    However, when I checked the python version the system uses via terminal (python -V), it still shows python 2.6.

    How will I make the system use python2.7 as its default python?

    Or if possible, how will I uninstall python2.6?

    Thanks in advance!

    解决方案

    Uninstalling the system Python is a bad idea. There are many other packages and softwares that depend on it. It'll be better that you use python2.7 by either modifying the $PATH or creating an alias e.g. python2.7 that points to the python that you installed in /opt dir.

    展开全文
  • 在 Ubuntu 下卸载 Python2.7 1. 卸载 python2.7 及相关依赖 sudo apt-get remove python2.7 sudo apt-get remove --auto-remove python2.7 2. 删除掉 python2.7 sudo apt-get purge python2.7 或者 sudo apt-get ...

    1. 卸载 python2.7 及相关依赖

    sudo apt-get remove python2.7
    sudo apt-get remove --auto-remove python2.7
    

    2. 删除掉 python2.7

    sudo apt-get purge python2.7 
    

    或者

    sudo apt-get purge --auto-remove python2.7
    

    当然,为避免系统发生意外情况(崩溃~~),最好还是不要卸载…

    展开全文
  • 如何在Mac OS X 10.6.4上卸载Python 2.7

    千次阅读 2020-07-19 12:09:26
    I want to completely remove Python 2.7 from my Mac OS X 10.6.4. 我想从Mac OS X 10.6.4中完全删除Python 2.7

    本文翻译自:How to uninstall Python 2.7 on a Mac OS X 10.6.4?

    I want to completely remove Python 2.7 from my Mac OS X 10.6.4. 我想从Mac OS X 10.6.4中完全删除Python 2.7。 I managed to remove the entry from the PATH variable by reverting my .bash_profile . 我设法通过还原.bash_profilePATH变量中删除了该条目。 But I also want to remove all directories, files, symlinks, and entries that got installed by the Python 2.7 install package. 但是我也想删除所有由python 2.7安装包安装的目录,文件,符号链接和条目。 I've got the install package from http://www.python.org/ . 我从http://www.python.org/获得了安装包。 What directories/files/configuration file entries do I need to remove? 我需要删除哪些目录/文件/配置文件条目? Is there a list somewhere? 某处有清单吗?


    #1楼

    参考:https://stackoom.com/question/G1c1/如何在Mac-OS-X-上卸载Python


    #2楼

    This one works: 这个作品:

    cd /usr/local/bin/
    ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
    

    Description: It list all the links, removes @ character and then removes them. 说明:列出所有链接,删除@字符,然后删除它们。


    #3楼

    If you installed it using the PKG installer, you can do: 如果使用PKG安装程序安装了它,则可以执行以下操作:

    pkgutil --pkgs
    

    or better: 或更好:

    pkgutil --pkgs | grep org.python.Python
    

    which will output something like: 这将输出类似:

    org.python.Python.PythonApplications-2.7
    org.python.Python.PythonDocumentation-2.7
    org.python.Python.PythonFramework-2.7
    org.python.Python.PythonProfileChanges-2.7
    org.python.Python.PythonUnixTools-2.7
    

    you can now select which packages you will unlink (remove). 您现在可以选择要取消链接(删除)的软件包。

    This is the unlink documentation: 这是取消链接文档:

     --unlink package-id
                 Unlinks (removes) each file referenced by package-id. WARNING: This command makes no attempt to perform reference counting or dependency analy-
                 sis. It can easily remove files required by your system. It may include unexpected files due to package tainting. Use the --files command first
                 to double check.
    

    In my example you will type 在我的示例中,您将输入

    pkgutil --unlink org.python.Python.PythonApplications-2.7
    pkgutil --unlink org.python.Python.PythonDocumentation-2.7
    pkgutil --unlink org.python.Python.PythonFramework-2.7
    pkgutil --unlink org.python.Python.PythonProfileChanges-2.7
    pkgutil --unlink org.python.Python.PythonUnixTools-2.7
    

    or in one single line: 或一行:

    pkgutil --pkgs | grep org.python.Python | xargs -L1 pkgutil -f --unlink
    

    Important: --unlink is not available anymore starting with Lion (as of Q1`2014 that would include Lion, Mountain Lion, and Mavericks). 重要提示:--unlink从Lion(从2014年第一季度开始,包括Lion,Mountain Lion和Mavericks)不再可用。 If anyone that comes to this instructions try to use it with lion, should try instead to adapt it with what this post is saying: https://wincent.com/wiki/Uninstalling_packages_(.pkg_files)_on_Mac_OS_X 如果涉及此说明的任何人都尝试将其与狮子一起使用,则应尝试改编本文所讲的内容: https : //wincent.com/wiki/Uninstalling_packages_(.pkg_files)_on_Mac_OS_X


    #4楼

    No need to uninstall old python versions. 无需卸载旧的python版本。

    Just install new version say python-3.3.2-macosx10.6.dmg and change the soft link of python to newly installed python3.3 只需安装新版本,说python-3.3.2-macosx10.6.dmg并将python的软链接更改为新安装的python3.3

    Check the path of default python and python3.3 with following commands 使用以下命令检查默认python和python3.3的路径

    "which python" and "which python3.3" “哪个python”和“哪个python3.3”

    then delete existing soft link of python and point it to python3.3 然后删除python的现有软链接并将其指向python3.3


    #5楼

    关于删除符号链接,我发现这很有用。

    find /usr/local/bin -lname '../../../Library/Frameworks/Python.framework/Versions/2.7/*' -delete
    

    #6楼

    Note : If you installed Python using Homebrew, then you can follow the following steps, otherwise look for another solution! 注意如果使用Homebrew安装了Python,则可以按照以下步骤操作,否则请寻找其他解决方案!


    To uninstall Python 2.7.10 which you installed using Homebrew, then you can simply issue the following command: 要卸载使用Homebrew安装的Python 2.7.10,可以简单地发出以下命令:

    brew uninstall python
    

    Similarly, if you want to uninstall Python 3 (which you installed using Homebrew): 同样,如果要卸载Python 3(使用Homebrew安装),请执行以下操作:

    brew uninstall --force python3
    
    展开全文
  • #卸载python2.7 sudo apt-get autoremove python2.7 #链接python3.7 sudo ln -s /usr/bin/python3.7 /usr/bin/python #链接pip3 sudo ln -s /usr/bin/pip3 /usr/bin/pip 再次输入python,得到一下结果: .....
  • ubuntu完全卸载python2.7

    千次阅读 2020-05-29 16:10:20
    centos不可以卸载python2.7,因为yum依赖python2.7 此处介绍ubuntu如何卸载python2.7 1.卸载python2.7 sudo apt-get remove python2.7 2.卸载python2.7及其依赖 sudo apt-get remove --auto-remove python2.7 3....
  • 树莓派卸载python2.7 卸载 sudo apt-get autoremove python2.7 链接python3.7 sudo ln -s /usr/bin/python3.7 /usr/bin/python 链接pip3 sudo ln -s /usr/bin/pip3 /usr/bin/pip
  • centOS7-下载,安装、卸载python2.7

    千次阅读 2019-03-20 14:41:32
    centos系统安装和卸载Python2.7 centos下快速安装安装python2.7和第三方库 一、安装python2.7 1.安装依赖环境 # yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-...
  • 1、删除已有的Python rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps whereis python |xargs rm -frv whereis python 2、删除已有的yum rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps where...
  • 害怕2.7的干扰直接卸掉sudo apt-get remove python2.7,高高兴兴地重启,结果悲剧了,重新烧录了好几次,没有想到python2.7的依赖关系,上网找黑屏的原因也没有找到,结果在找卸载python2.7时找到了。 卸载python2.7...
  • 作死之前先看看下文再作死,先保存下你的python2.7,一定要记得 cp了上面的链接内容,大概的卸载方法是: 删除Python 2.7 framework sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7 ...
  • 虚拟机Ubuntu16.04,运行sudo apt-get autoremove 命令,然后sudo apt-get remove python手动卸载python2.7,然后我的ROS开发环境没了 问题描述 最近需要搭建DDS的开发环境,在搭建过程中报错,屏幕提示可能需要运行...
  • 优势不小心卸载了yum,或者python;此时先卸载将Centos7中的python2.7和yum相关程序完全卸载,然后一键重装,很简单。
  • 卸载python2.7出错

    2016-10-25 17:02:00
    由于安装了Python2.7 再在该目录下安装ACtivePython2.7,发现idle不可以用。 卸载时出错,用了各种办法。 最后: 点击python-2.7.11.amd64.msi 或者 control panel -> Programs -> Remove Program 先...
  • 1. 删除现有Python ## 强制删除已安装python程序及其关联程序 rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ## 删除所有残余文件 xargs:允许你对输出执行其他某些命令 whereis python |xargs rm -...
  • 原文有地方错误,见红色地方为改正后的命令 ...安装python2.7需要与centos内核版本保持一致,否则会出现冲突 1、查看centos内核版本 [root@067mqtt2]# cat /etc/redhat-release cat /etc/redhat-rel...
  • 因为CentOS系统中旧版本的Python已被深度依赖,所以不能卸载原有的Python,只能全新安装。 1.下载Pyhon,选择下载Gzipped source tar ball (2.7.6) (sig) 网址https://www.python.org/download
  • 目录1 卸载自带Python2.7.51.1 卸载自动Python1.2 删除残余文件1.3 验证删除2 安装Python3.9.02.1 下载Python3.9.02.2 上传、解压安装包2.3 生成编译脚本2.4 编译2.5 安装2.6 建立Python和pip3的软链3 环境变量设置...
  • CentOS7.2.1511卸载并重新安装python2.7及yum

    千次阅读 多人点赞 2018-06-16 12:54:39
    本来想在服务器CentOS7上升级python2.7至python3.5结果误删了yum,导致yum死活用不了。尝试一波方案,结果都没有解决,只能卸载并重新安装python和yum。1.卸载python:#rpm -qa|grep python|xargs rpm -e --all...
  • 升级centos7自带的Python2.7到Python3.8 Python是和centos以及Redhat系列高度集成的一个编程环境,但fedora(通常centos和redhat都属fedora系列,不是包含关系哦,这是题外话,不扯了。)centos7和Redhat7自带的...
  • Ubuntu卸载python(慎重)

    万次阅读 多人点赞 2019-10-24 19:23:20
    Ubuntu卸载python(慎重) 看到这篇博客你还有机会收手 Ubuntu系统下不要轻易卸载系统自带的python(2.7、3.5),因为Ubuntu依赖python环境。 惨痛经历: 卸载python3.5(作死) sudo apt-get remove python3.5 #...
  • CentOS 中默认安装了 2.7Python,为了使用新版 python,可以对旧版本进行升级。但是由于很多基本的命令、软件包都依赖旧版本,比如:yum等。所以,在更新 Python 时,建议不要删除旧版本(新旧版本可以共存)。 1...
  • 直接通过apt install python3 或者apt remove python2 运行不成功,报错提示为python-is-python2,所以对应的卸载和安装命令为:apt remove python-is-python2,apt install python-is-python3

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 11,530
精华内容 4,612
关键字:

卸载python2.7

python 订阅