[proFit-list] problem with Python

Harbinson, Jeremy jeremy.harbinson at wur.nl
Wed Feb 12 03:37:29 CST 2014


Hi,
This is one of those 'the answer is obvious once you have read some one's posting' posts. Pro Fit refused to accept the path to my latest Enthought installation (which is 2.7). I have never been fully clear about the directories used by the Enthought distribution - this has changed over the years. I then found another path to Python 2.7 more or less where I thought it should be and pro Fit did accept that, so I used that. It turns out my recent Enthought installation is just fine, it has pandas, but it is 64 bit. The other Python 2.7 is an old installation and is 32 bit - it does not have pandas. Davide Guarisco has posted this diagnosis and a fix, which is to maintain two Python installations; a 32 bit one for pro Fit, and a 64 bit one for routine use.  So it looks like I should have paid more attention to the evolution of the Enthought installations and until there is 64 bit support I'll need to manage two installations (which from what Davide has written should not be dreadfully difficult).

On another matter, during the analysis of this problem I really missed having some kind of console on which Python running within pro Fit could give responses etc.

Thanks and all the best,
Jeremy

From: proFit-list [mailto:profit-list-bounces at quantum-soft.com] On Behalf Of pro Fit Support
Sent: dinsdag 11 februari 2014 17:39
To: all things about pro Fit
Subject: Re: [proFit-list] problem with Python

Yep, Chris Lee may be right.

Try the following: From the terminal, where Pandas works, execute the following Python commands

import sys
sys.executable

This should return the path to Enthought's Python executable.

Now start pro Fit, choose Preferences under the pro Fit menu and go to the Scripting tab. Click the button "Change..." beside "Path to Python Library" and navigate to Enthought's Python executable as retrieved above, then click Open. After that, pro Fit should tell you if it is able to work with the selected executable (it must be a 32 bit executable, and it must be Python 2.6 or 2.7. If pro Fit says that it can use that executable, restart pro Fit. Now pro Fit should use Enthought's Python.

Best regards

Kurt Sutter
QuantumSoft

On 11 Feb 2014, at 4:48, Chris Lee <laserboy at fusemail.com<mailto:laserboy at fusemail.com>> wrote:


It sounds (and you have probably checked this) like you are using the wrong version of python.

On 11 Feb 2014 (W: 7), at 16:46, Harbinson, Jeremy <Jeremy.Harbinson at wur.nl<mailto:Jeremy.Harbinson at wur.nl>> wrote:


Hi,
I am not able to import pandas into a Python function. I am using OSX 10.8.4, I have the Enthought Python Distribution installed (1.3.0.1715) and my ProFit is 6.2.11.
Pandas can be imported into Python running in a terminal and works there, so it seems to be functioning in a general sense (and it works in Enthought's own python gui). I needed to update a function that used PyDataFrame, which no longer works, and pandas seemed to be an easy alternative, but the line:

import pandas as pd

gets the response that there is 'no module called pandas' - even using sys.path.append to add the pandas path (or what I think is the path) did not work. Any suggestions? My guess is that this is a basic, silly mistake on my part, so don't spare me the obvious!
All the best,
Jeremy Harbinson
_______________________________________________
proFit-list mailing list
proFit-list at quantum-soft.com<mailto:proFit-list at quantum-soft.com>
http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

_______________________________________________
proFit-list mailing list
proFit-list at quantum-soft.com<mailto:proFit-list at quantum-soft.com>
http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20140212/cb4da3ac/attachment.html>


More information about the proFit-list mailing list