简体   繁体   English

anaconda 3 基础环境设置错误 PYTHONPATH

[英]anaconda 3 base environment sets wrong PYTHONPATH

This afternoon I did a clean install of the OS in my Mac Mini, then downloaded the last release of Anaconda and installed it.今天下午,我在我的 Mac Mini 上进行了操作系统的全新安装,然后下载了 Anaconda 的最新版本并安装了它。
I did this many time, but never have I faced issues right from the start.我这样做了很多次,但我从来没有从一开始就遇到过问题。

I tried simply importing some packages, like Pandas of Numpy , but got errors.我尝试简单地导入一些包,例如PandasNumpy ,但出现错误。
After some attempts to update pip , I realised that Python was looking in the wrong place!!在尝试更新pip ,我意识到 Python 找错了地方!!
This is confirmed by printing sys.path .这可以通过打印sys.path来确认。

So I open my .bash_profile and commented out the EXPORT PYTHONPATH=/opt/local/Library... line.所以我打开我的.bash_profile并注释掉EXPORT PYTHONPATH=/opt/local/Library...行。
Unfortunately, this doesn't help.不幸的是,这无济于事。

Does anyone know how to fix the PYTHONPATH issue?有谁知道如何解决 PYTHONPATH 问题?
Should I just remove the lines which activate the base environment and create a clean new one?我应该删除激活基本环境的行并创建一个干净的新环境吗?
Isn't there a way to simply fix the base environment?难道没有办法简单地修复基础环境吗?

Thanks for the support.感谢您的支持。 Cheers干杯

在此处输入图像描述

I solve this by commenting out also the line我通过注释掉这一行来解决这个问题

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"

in the .bash_profile file..bash_profile文件中。

I'm don't really like it, because it doesn't feel as a clean solution, but it works.我不是很喜欢它,因为它感觉不是一个干净的解决方案,但它确实有效。

Hopefully this might help someone else who encounters the same issue.希望这可以帮助遇到同样问题的其他人。

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

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