help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Octave to use Anaconda Python Environment


From: Ben Abbott
Subject: Re: Getting Octave to use Anaconda Python Environment
Date: Mon, 18 Apr 2016 12:21:58 -0400

On Apr 17, 2016, at 11:04 PM, Samuel Dupree <address@hidden> wrote:

On 4/17/16 22:06:52, Ben Abbott wrote:

On Apr 17, 2016, at 21:38, Samuel Dupree <address@hidden> wrote:

I'm running Octave version 4.0.0 on a MacBook Pro running Mac OS X ver. 10.11.4 (El Capitan). How does one get the Octave application to use the Anaconda Python Environment?

Sam Dupree.

I don't know if I understand your question, but Octave's symbolic toolbox uses sympy. Perhaps looking at the code would help.

Ben

Ben,

You are correct when you say that Octave's symbolic toolbox uses sympy. However, the version of sympy I'm using is installed in the Anaconda environment, so my question is how do I get Octave to recognize it should be looking to /Users/user/anaconda for python.

How do I get Octave to use python at /Users/user/anaconda?

Sam Dupree.

Octave’s symbolic toolbox is tricky to install on OS X. I’m confident it can be done, but haven’t yet done it myself. My difficulty is due to Fink’s python which is named “python2.7”. In order for symbolic-2.3.0 toolbox’s configure process to use Fink’s python2.7, it is necessary to modify configure.ac …

16 
-17 AC_PATH_PROG(PYTHON, python)
+17 AC_PATH_PROG(PYTHON, python2.7)
18 if test -z "$PYTHON"; then
19   AC_MSG_ERROR(Failed to find Python)
20 fi

You’ll need to replace “python2.7” with the command needed to run python in the Anaconda environment.

Next, run ./bootstrap in order to create the configure script that uses the desired python command.

Then create a tarball for symbolic-2.3.0 using the corrected configure script.

   tar -z -c -f symbolic-2.3.0.tar.gz symbolic-2.3.0

The symbolic toolbox requires sympy >=0.7.5. Fink provides version 0.7.3. Thus, I created a local Fink package for version 0.7.6.1 and installed it. 

I then installed a local version of the Symbolic toolbox

   pkg install -local symbolic-2.3.0.tar.gz

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]