简体   繁体   English

卸载较旧并安装新的(MAC)后无法运行新的Python版本

[英]Trouble running new Python version after uninstalling older and installing new (MAC)

I was trying to uninstall my Anaconda version of Python and reinstall the regular Python 3.5 version (mac). 我试图卸载我的Anaconda版本的Python,然后重新安装常规的Python 3.5版本(mac)。 I used the answer from this SO question to remove the Anaconda folder using rm -rf ~/anaconda and using the Python website installed version 3.5. 我使用这个SO问题的答案,使用rm -rf ~/anaconda并使用Python网站安装的3.5版删除了Anaconda文件夹。

But running python --version or python from command line returns this error: 但是从命令行运行python --versionpython返回此错误:

Pauls-MacBook-Pro:~ paul$ python --version
-bash: /Users/paul/anaconda/bin/python: No such file or directory

Is there some bash script that is pointing the old deleted /Anaconda folder that is causing the 3.5 version to not run? 是否有一些bash脚本指向导致3.5版本无法运行的旧的/ Anaconda文件夹? I really don't want to mess with system files if I don't know what I'm doing 如果我不知道自己在做什么,我真的不想弄乱系统文件

Based on your comments, it seems like bash has stored /Users/paul/anaconda/bin/python as the entry for python for performance reasons. 根据您的评论,出于性能原因,bash似乎已将/Users/paul/anaconda/bin/python存储为python的条目。 hash -d python should remove this entry and use normal path resolution. hash -d python应该删除该条目并使用常规路径解析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM