2

I am trying to use the the Rodeo IDE. However, according to the following error message, Rodeo can't find the right version of Python (I've installed the Anaconda distribution with Python 3.5, but according to the following message, that might not be the version of python Rodeo is trying to use):

"Bad news! Rodeo can't start. If you do have one of them installed, then the issue is that Rodeo is using the "wrong python". Rodeo defaults to using whatever python is on your PATH (or on Windows, whatever is set in your Environment Variables)." 

Note, I use Mac OS 10.11.1.

I've tried to remove Python 2.7 (successfully, I think) and to reinstall Python 3.5 through Anaconda, but the trouble with Rodeo persists, I think because I have not changed the version of Python in my PATH.

How can I discover which version of Python is in my PATH and how could I change it to the version associated with the Anaconda distribution? Python beginner and answers can't be too simple.

Joshua Rosenberg
  • 4,014
  • 9
  • 34
  • 73

2 Answers2

3

In Terminal type

 which python 

to get the current python program path. You can edit your ~/.bashrc and add the following with the path to your anacondas distribution at the end and then remove all other python paths in the .bashrc file.

  export PATH=$PATH:/usr/local/lib/  <path to Anacondas...>
    #for me it is /usr/local/anaconda/bin

Optional: If you want to add other libraries / execute your own programs as if they were in the library or save yourself reinstalling everything, you can use the following:

  export PYTHONPATH=/Library/Python/2.7/site-packages'

where you add the path of any libraries you wish to include.

If on Mac: You have a .profile file instead of a bashrc. You therefore need to add the Path (above) to it and refresh your terminal. The easiest way is to use nano.

nano ~/.profile

#add: 
    export PATH=$PATH:/usr/local/anaconda/bin

# ctrl+x, then y, then rtn : to save and exit

#run bash or reopen terminal to refresh
bash

which python #should now be updated to anacondas path
user2589273
  • 2,379
  • 20
  • 29
  • Thanks, the good news - the first two commands seem to *work*, but Rodeo still seems to display the same error. Any advice on what to try – Joshua Rosenberg Dec 25 '15 at 01:41
  • @JoshuaRosenberg I just noticed you are using Mac, you want to edit the .profile file in your home directory nano ~/.profile as you won't have a bashrc. Also don't forget to type bash to reinitiate the profile/bashrc file once you have changed it. – user2589273 Dec 25 '15 at 01:45
1

I suggest try to use pyenv - https://github.com/yyuu/pyenv . It's simple to install and use and it has anaconda support. Also this plugin can be helpful - https://github.com/yyuu/pyenv-virtualenv .

ip0000h
  • 158
  • 2
  • 12