清除OS X上所有其他已安装的python [英] Cleaning out all other installed pythons on OS X
问题描述
看在上帝的份上,我快要疯了.我在OS X特立独行.看来我安装了许多python(Anaconda,EDA [类似的东西] ...),而我刚从Macports安装了一个.然后从Macports,我为python安装了一个名为py-graph-tool的模块.现在,当我在python中导入该模块时,出现此错误:
Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6
因此,我想解决方案将是清理所有其他python.所以我的问题是:如何清理所有其他python?
假设您要使用Anaconda Python进行科学工作...请执行以下操作:
- 在主目录(
~
)中创建一个名为.bashrc
的文件 - 向其中添加以下内容:
export PATH=~/anaconda/bin:$PATH
- 关闭所有打开的终端
现在,当您打开一个新的终端时,python
应该会启动Anaconda Python.
For god's sake I'm going crazy. I'm on OS X mavericks. It seems that I installed a lot of pythons (Anaconda, EDA[something like that] ... ) and I just installed the one from Macports. Then also from Macports I installed a module for python called py-graph-tool. Now when I import this module in python I get this error:
Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6
I found from this question the following: "this error shows up when a module tries to use a python library that is different than the one the interpreter uses, that is, when you mix two different pythons."
So I guess the solution would be to clean all other pythons. So my question is: how to clean all other pythons?
Assuming, you want to use the Anaconda Python for scientific work...do the following:
- create a file called
.bashrc
in your home directory (~
) - add the following to it:
export PATH=~/anaconda/bin:$PATH
- close out all open terminals
Now when you open a fresh terminal, python
should bring up the Anaconda Python.
这篇关于清除OS X上所有其他已安装的python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!