Welcome, Guest
Username: Password: Remember me

TOPIC: error running Telemac v7p0r1

error running Telemac v7p0r1 9 years 8 months ago #16175

  • SEBJAM
  • SEBJAM's Avatar
Hi,
I have installed TELEMAC v7p0r1 on my computer. However when I'm trying to run simulation which previously worked with v7p0r0 I immediately get an error message saying:

File: "C:\telemac\v7p0r1\scripts\python27\parsers\parsersSELAFIN.py", line 74 in <module>
from scipy.patial import cKDTree
ImportError: No module named scipy.spatial

Does anyone know what the problems is and how I fix it? I have attached my systel.config-file (if it is of any interests).

File Attachment:

File Name: systel.cfg
File Size: 2 KB
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16178

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

Yes, this is part of the standard requisites of the python environment with TELEMAC: numpy, scipy and matplotlib.

On windows, you can access installation files for these python libraires from Christoph Gohlke's page:
~gohlke/pythonlibs/

So far, users have been able to do without these python libraries but this was only pure chance.

Importantly, since v7p0, we are now also asking that you install mayavi, which in itself depends on many other libraries. Therefore instead of installing these lbrary individually, we recomand that you install the free package installer Canopy from Enthought.

You will probably able to do without mayavi (Canopy) for another few years, but at some stage we will ask that you update ... unless we find other ways before then.

Hope this helps,
Sébastien.
The administrator has disabled public write access.
The following user(s) said Thank You: SEBJAM

error running Telemac v7p0r1 9 years 8 months ago #16209

  • SEBJAM
  • SEBJAM's Avatar
Thank you for your help!

I've installad the Canopy and downloaded the scipy-package. However, TELEMAC is still complaining about the missing scipy. It seems as if TELEMAC doesn't read the canopy-python, but instead the old python 2.7.3. I have changed PATH-variables so it directs on the canopy library.

PATH-variable:
C:\Telemac\Enthought\User\Scripts;C:\Telemac\Enthought\User;c:\gcc\bin;C:\Telemac\v7p0r1\scripts\python27

Am I doing something wrong with Canopy, or how do I make the TELEMAC understand that it should read from Canopy?.
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16210

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

There is a setting at the end of the Canopy install that ask whether Canopy should take over your original python installation -- you have to say yes to that. You can also run the Canopy interface, check on the top menu Edit => Preferences => the General tab and "Set as default".

Otherwise try checking you system path for any remaining entries on c:\python27 (the other python) and remove these. C:\Telemac\Enthought\User\Scripts and C:\Telemac\Enthought\User are the only two you need (and you seem to have those already).

Alternatively, if you feel like it, you can search for "python.exe" in the whole of your system key registry and make sure the syntax is as follows:
...\python.exe “%1” %*

(with the appropriate PATH to python.exe)

Hope this helps,

Sébastien.
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16211

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hi Sébastien,

now I had a quick look into the package list of the Enthought distribution. Actually in the free available Express version the package Mayavi isn't listed.
www.enthought.com/products/canopy/package-index/

So one has to install it later manually with an integrated package manager like with other distributions, e.g. Anaconda or WinPython.
Then my question why prefering the Enthought distribution over other heavy distributions or even more slim distributions?


Best regards,
Clemens
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16213

  • SEBJAM
  • SEBJAM's Avatar
Hi,
I have now changed all the syntax of the system key registrary so that the path of the python.exe is directed to the canopy/user python.exe.

The problem with Telemac complaining about missing Scipy is gone. But now instead python refuses to recognaise the options after runcode.py. Instead of running TELEMAC it only shows me the option of runcode.py.

The only way to get it work is to write:
python C:\Telemac\v7p0r1\scripts\python27\runcode.py telemac2d -s Helgea10.cas -c win7gforp

So it works, but it would be nice to get it to run "properly". =)
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16231

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
You file file extension *.py is not recognized as python.exe ...

make sure you have gone through all registry keys.

Hope this helps,
Sébastien
The administrator has disabled public write access.

error running Telemac v7p0r1 8 years 9 months ago #19468

  • Nico
  • Nico's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hello all,

is this still an open issue for anyone? In my case it is/was.

I think the problem with running python-scripts is a conflict of Python-"installations". I quoted installations, because Python wasn't really installed before, but anyway modified the registry:

In my case, the conflict was generated by Python 2.7 coming with ArcGIS 10.X. Although it isn't registered as an installed application, you'll find links on it in the registry (KEY-name: command, VALUE: <path>/python.exe <params>).

My Solution:
After I installed my desired Python-distribution to setup and run Telemac (I use Anaconda 2.3.0), I had to modify the proper registry-entries. Following is necessary:
1.) The correct path to your python.exe must be set (nothing to do with environment variables)
2.) The entry must contain the addition according to Sébastien
... in my case there is a variable (KEY) called "command", where I had to change the path and set the additions. Now it looks like this:
"C:\Anaconda\python.exe" "%1" %*

Be careful not to break links. ArcMap still runs fine afterwards and Telemac as well. Best you search your registry generally for "python.exe" and evaluate each single entry. You will find entries that are named "python.exe" and entries that contain "python.exe" as part of the value. Both have impact related to this issue and need to be adapted.

Another option would be to add the desired packages to your ArcGIS-Python, but I didn't want to bother myself with other dependency-issues.


... any other experiences?

Cheers
Nico
The administrator has disabled public write access.

error running Telemac v7p0r1 9 years 8 months ago #16212

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello Clemens,

You are right - you have to use the package manager of Canopy to install mayavi (and even maybe matplotlib).

I do mind any other recommendations for any other python packaging software. Canopy is just the one we use at HR Wallingford and it is therefore easier for me to support.

I would welcome other recommendation, particularly for slimmer packaging software (have to be mutli-platform though) that would include just the necessary libs we need.

Thank you Clemens,

Sébastien.
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.