Anaconda Runtime Error: Python is not installed as a framework?

前端 未结 10 1609
时光取名叫无心
时光取名叫无心 2020-12-24 05:53

I\'ve installed Anaconda with the pkg installer:

Python 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015, 17:04:42) 
[GCC 4.2.1 (Apple Inc. build 557         


        
相关标签:
10条回答
  • 2020-12-24 06:17

    I was having the same problem with anaconda 2 & matplotlib 1.5.3.

    Running a simple conda install matplotlib to reinstall matplotlib did the trick for me.

    0 讨论(0)
  • 2020-12-24 06:30

    If you experience this error, don't forget to check your bash_profile.

    You can do this in terminal by:

    cd
    

    then

    nano .bash_profile
    

    check the contents. Macports and Homebrew add their own headings for things they've done here. You can remove the declarations they make to $PATH. Just leave the one Anaconda has made. I had a If you would like, you can:

    cp .bash_profile ./bash_profile_backup_yyyy_mm_dd 
    

    and have a backup of the file, with filename indexing to the date you changed it. That is, provided you actually put in the date in instead of just the formatting characters I'm suggesting.

    source ~/.bash_profile
    

    will refresh your system's reference to the bash_profile and you should be good to go in importing and using matplotlib

    0 讨论(0)
  • 2020-12-24 06:30

    Quickfix: Run your file using pythonw, instead of python.

    e.g pythonw testFile.py.

    0 讨论(0)
  • 2020-12-24 06:34

    Posting since I just had this issue and this was a quick fix:

    If you used pip to install:

    1. Create ~/.matplotlib/matplotlibrc

    2. Add "backend: TkAgg" (without the quotations) to the file.

    0 讨论(0)
提交回复
热议问题