【问题标题】:I removed anaconda and now my python path is messed up. Do you know how to fix it?我删除了 anaconda,现在我的 python 路径搞砸了。你知道如何解决吗?
【发布时间】:2013-11-10 23:31:54
【问题描述】:

我今天早些时候下载了 anaconda 来试验一个说我需要它的库。我最终删除了它,但现在我的旧 python 安装不起作用。

当我查看环境变量时,我注意到它在路径下显示 anaconda。有谁知道如何让一切恢复正常?

PATH=/Users/spencercooley/anaconda/bin:/usr/local/share/npm/bin:/opt/local/bin:/opt/local/sbin:/Users/spencercooley/.rvm/gems/ruby-1.9.3-p392/bin:/Users/spencercooley/.rvm/gems/ruby-1.9.3-p392@global/bin:/Users/spencercooley/.rvm/rubies/ruby-1.9.3-p392/bin:/Users/spencercooley/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/ImageMagick/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin

【问题讨论】:

  • 标题很完美!

标签: python environment-variables anaconda


【解决方案1】:

查看/Users/spencercooley/.bashrc 和/或/Users/spencercooley/.bash_profile 文件。其中一个可能包含像export PATH=/Users/spencercooley/anaconda/bin:$PATH 这样的行,您可以将其删除。然后,加载一个新的终端实例,它应该会恢复正常。

【讨论】:

    【解决方案2】:

    我整个早上都在用头撞墙。 最终这对我有用: Anaconda 运行一个脚本来编辑你的

    块引用 ~/.bash_profile

    要恢复到最初的 python 安装,只需删除 ~/.bash_profile 上的 anaconda 路径:

    1. 运行 nano ~/.bash_profilevi ~/.bash_profile
    2. 删除格式为 /home//anaconda3/bin:$PATH 的行

    【讨论】:

      猜你喜欢
      • 2018-10-26
      • 2012-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-08
      • 1970-01-01
      • 2015-07-17
      • 1970-01-01
      相关资源
      最近更新 更多