Hello [name removed]!
I have been using version v8p4r0 of TELEMAC2D on a Linux system, and now I need to install it on a Windows system. I followed the steps provided at openTELEMAC / wintel · GitLab, but I encountered an error during the compilation process while building the Python API (see attached screenshot). I have included the configuration files and the bat script in the attachments.
I would greatly appreciate any suggestions or advice you can provide.
[name removed]
systel.cfg (3.45 KB)
build-telemac.bat.txt (15.9 KB)
pysource.gnu.bat.txt (2.17 KB)
I don’t know what could be causing this problem. If you don’t intend to develop in TELEMAC, you can try using the new automatic installer which should be much easier to install.
1 Like
Hello [name removed],
Thank you for your response! In fact, I downloaded the new automatic installer right away. When I enter ‘telemac2d.py t2d_breach.cas’ in the TELEMAC Command Prompt, a window pops up asking me to choose a program to open the file (see attached image). After selecting ‘Python’, a new window appears briefly and then closes. Additionally, when I enter ‘python compile_telemac.py’, I encounter the same issue as above during the building of the Python API. I have previously installed version v7p0, and I’m unsure if this is related to the current problem.
I apologize for my limited understanding of the internal configuring mechanisms. I would greatly appreciate your insights and suggestions.
[name removed]
Hello,
Your issue comes from the fact that the old TELEMAC V7P0 installer used to tweak the registry settings to open Python files with TELEMAC Python. Before Python 3 and the release of the Python Launcher for Windows, this was the only way to run TELEMAC Python scripts directly, i.e. without preceding the script with a call to the Python executable.
But now, this old registry trick prevents the Python Launcher from working properly. I’m going to help you fix it though. Could you open your registry (by entering “registry” in a command prompt) and go to the following key:
HKEY_CURRENT_USER\SOFTWARE\Classes\Python.File\Shell\open\command
And could you paste here the line that’s written in the right panel?
Hello [name removed],
The distribution of file paths in my registry editor seems to be somewhat different from what you said, I’ve attached the screenshot.
[name removed]
Could you check the same path in HKEY_LOCAL_MACHINE ?
Hello [name removed],
I went to the following key as you said:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\open\command
I’ve attached the screenshot.
[name removed]
Thanks, that is the problematic registry key. Could you enter this command in a shell and attach the result here:
where py
When I entered the command the shell displayed:
C:\Windows\py.exe
Great, all you need to do to fix your registry is edit the line pointing to python27 and replace it with the following (quotes are mandatory):
"C:\Windows\py.exe" "%L" %*
After that, TELEMAC scripts should work.
I’m sorry for the new problems despite no more pop-up windows (attached)