Welcome, Guest
Username: Password: Remember me

TOPIC: Python 3 environment - No module named configparser

Python 3 environment - No module named configparser 3 years 9 months ago #37736

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Telemac users,

First attempt to compile v8p2r0 with python 3 doesn't work... I guess with python environment problem?

C:\opentelemac-mascaret\v8p2r0>config.py
Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p2r0\scripts\python3\config.py", line 14, in <module>
from configuration.cfg import Config
File "C:\opentelemac-mascaret\v8p2r0\scripts\python3\configuration\cfg.py", line 8, in <module>
import configparser
ImportError: No module named configparser


C:\opentelemac-mascaret\v8p2r0>python -V
Python 3.8.3

C:\opentelemac-mascaret\v8p2r0>C:\opentelemac-mascaret\v8p2r0>path
PATH=C:\Users\alexis.bernard\Anaconda3\Library\bin;C:\Users\alexis.bernard\Anaconda3;C:\opentelemac-mascaret\v8p2r0\scripts\python3;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\mpi\intel64\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\swash;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\TortoiseSVN\bin;C:\opentelemac-mascaret\mingw64\bin;C:\opentelemac-mascaret\mpich2\bin;C:\opentelemac-mascaret\mpich2\lib;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Java\jre1.8.0_221\bin;C:\Program Files (x86)\Box\Box Edit\;C:\Users\alexis.bernard\AppData\Local\Microsoft\WindowsApps;

I don't see what's wrong and I don't see any post with confiparser error.

Any ideas?
The administrator has disabled public write access.

Python 3 environment - No module named configparser 3 years 9 months ago #37775

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
OK. Problem solved. The error was due to the fact that python 3 came from anaconda and even if python 3 was the defaut version of python, configparser (wich is python 3 module) couldn't be imported.

Also, extension .py was associated to python 2.7 !!!
The administrator has disabled public write access.

Python 3 environment - No module named configparser 2 years 6 months ago #40384

  • Alexandre
  • Alexandre's Avatar
Hey,

I have exactly the same problem than you but I downloaded python3 from python.org directly. Can you please explain how did you import configparser module ?

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

Python 3 environment - No module named configparser 1 year 7 months ago #42404

  • Erken
  • Erken's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 27
I have the same problem now. Did you get it fixed?
Thank you!
The administrator has disabled public write access.

Python 3 environment - No module named configparser 1 year 2 months ago #43206

  • Marleine
  • Marleine's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
Hello,
I also have the same problem. Can somebody help please ?

Regards, Marleine
The administrator has disabled public write access.

Python 3 environment - No module named configparser 1 year 2 months ago #43208

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi,

I can't answer that question. There have been many changes since my first post.

It depends on the way you setup Telemac (compilation of the source, automatic installer)... and also on the way you launch your case.

Anyway, it can be explained by different python on your computer.

Alexis
The administrator has disabled public write access.
The following user(s) said Thank You: Marleine

Python 3 environment - No module named configparser 1 year 2 months ago #43211

  • Marleine
  • Marleine's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
Thank you Alexis,
I uninstalled telemac and all versions of python on my computer. Then I installed again telemac (using automatic installer). it works.

Best Regards,
Marleine
The administrator has disabled public write access.
Moderators: borisb

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