I’ve been getting the following error trying to run Salome. Tried Ubuntu and generic Linux versions:
/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:184: SyntaxWarning: invalid escape sequence ‘[’
contains_list = re.findall(‘([[^]]])', elt)
/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:301: SyntaxWarning: invalid escape sequence ‘\ ’
cmd = cmd.replace(’ ', '\ ‘).replace(’\ ', ’ ', 1)
/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:301: SyntaxWarning: invalid escape sequence ‘\ ’
cmd = cmd.replace(’ ', '\ ‘).replace(’\ ', ’ ‘, 1)
/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py:40: SyntaxWarning: invalid escape sequence ‘$’
pattern = re.compile(’${ ( [^}] ) }’, re.VERBOSE) # string enclosed in ${ and }
Traceback (most recent call last):
File “/home/forti/Downloads/SALOME-9.12.0/./salome”, line 71, in main
from salomeContext import SalomeContext, SalomeContextException
File “/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContext.py”, line 26, in
from parseConfigFile import parseConfigFile
File “/home/forti/Downloads/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py”, line 49, in
class MultiOptSafeConfigParser(configparser.SafeConfigParser):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module ‘configparser’ has no attribute ‘SafeConfigParser’. Did you mean: ‘RawConfigParser’?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/forti/Downloads/SALOME-9.12.0/./salome”, line 1266, in
main(args)
File “/home/forti/Downloads/SALOME-9.12.0/./salome”, line 1258, in main
except SalomeContextException as e:
^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable ‘SalomeContextException’ where it is not associated with a value
Result from mesa:
Traceback (most recent call last):
File “/home/forti/ProgramFiles/SALOME-9.12.0-native-UB22.04-SRC/./mesa_salome”, line 71, in main
from salomeContext import SalomeContext, SalomeContextException
File “/home/forti/ProgramFiles/SALOME-9.12.0-native-UB22.04-SRC/BINARIES-UB22.04/KERNEL/bin/salome/salomeContext.py”, line 26, in
from parseConfigFile import parseConfigFile
File “/home/forti/ProgramFiles/SALOME-9.12.0-native-UB22.04-SRC/BINARIES-UB22.04/KERNEL/bin/salome/parseConfigFile.py”, line 49, in
class MultiOptSafeConfigParser(configparser.SafeConfigParser):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module ‘configparser’ has no attribute ‘SafeConfigParser’. Did you mean: ‘RawConfigParser’?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/forti/ProgramFiles/SALOME-9.12.0-native-UB22.04-SRC/./mesa_salome”, line 1075, in
main(args)
File “/home/forti/ProgramFiles/SALOME-9.12.0-native-UB22.04-SRC/./mesa_salome”, line 1067, in main
except SalomeContextException as e:
^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable ‘SalomeContextException’ where it is not associated with a value
First,
running ‘./sat/sat config SALOME-9.12.0 --check_system’ still gives:
Unknown distribution: ‘not found’
Please add your distribution to src/internal_config/distrib.pyconf
Also, after a few step backs, I’ve installed manually a few dependencies.
These from old experience:
sudo apt install -y libcdt5
sudo apt install -y libcgraph6
sudo apt install -y libgvc6
sudo apt install -y libboost-system1.74.0
sudo apt install -y libqt5help5
sudo apt install -y libopenblas0
sudo apt install -y libcminpack1
sudo apt install -y libfreeimage3
sudo apt install -y libboost-all-dev
These are new:
sudo apt install python3-pip
pip install packaging
error: /usr/bin/env: ‘python’: No such file or directory
sudo ln -s /usr/bin/python3 /usr/bin/python
and install the missing packages using the apt utility.
On the other hand if you’re using the universal binary, then you need, as described in the README, to uncomment one line in the launcher to use the embedded system dependencies.
In addition, you should not do this symbolic link about python3.
You need to install this package instead (remove the symbolic link you set before)
forti@QuintalSoftHouse:~$ python3
Python 3.11.8 (main, Feb 25 2024, 16:39:33) [GCC 11.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
from distro import linux_distribution
print(linux_distribution)
<function linux_distribution at 0x7133266c44a0>
:1: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python’s platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.
(‘KDE neon’, ‘22.04’, ‘jammy’)
Hello nabil,
I jump in the conversation as I had a similar issue, from python I am getting:
print(linux_distribution())
<stdin>:1: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.
('TUXEDO OS', '22.04', 'jammy')
so in theory, I should add to $salome_path/sat/src/distrib.pyconf (tuxedo is based in ubuntu actually in kde neon to be exactly…)
"TUXEDO OS": "UB"
I also added "TUXEDOOS": "UB" as I saw this with redhat… neverhtless when I run sat tool it tells me that is not recognized and that i should add it.
sat/sat config SALOME-9.12.0-native --check_system
Unknown distribution: 'not found'
Please add your distribution to src/internal_config/distrib.pyconf
indeed if you look at the source code sat/src/architecture.py
and search for the function get_distribution, you can read that it needs to be set in lower case.
Here you need to set:
"tuxedo os" : "UB"
can you share the output of:
cat /etc/os-release
as well as the output of:
from distro import linux_distribution
print(linux_distribution())
and search for the function get_distribution, you can read that it needs to be set in lower case.
Here you need to set:
"tuxedo os" : "UB"
the output of print(linux_distribution()) is in my previous message
I added to $salome_path/sat/src/distrib.pyconf and runned sat command:
sat/sat config SALOME-9.12.0-native --check_system
CRITICAL :: Exception raised for execute_cli('config SALOME-9.12.0-native --check_system'):
|
| Traceback (most recent call last):
| File "/home/franco/Downloads/SALOME-9.12.0/sat/sat", line 60, in <module>
| returnCode = sat.execute_cli(args)
| File "/home/franco/Downloads/SALOME-9.12.0/sat/src/salomeTools.py", line 286, in execute_cli
| code = fun_command(self.remaindersArgs[1:])
| File "/home/franco/Downloads/SALOME-9.12.0/sat/src/salomeTools.py", line 415, in run_command
| self.cfg = cfgManager.get_config(datadir=self.datadir,
| File "/home/franco/Downloads/SALOME-9.12.0/sat/commands/config.py", line 435, in get_config
| raise src.SatException(
|
| src.SatException: Configuration file 'SALOME-9.12.0-native.pyconf' not found, use 'config --list' to get the list of available applications.
|
the output was from the universal vr as I wanted to use that one and was having issues with the explode command, for the ubuntu one (it was running but after running the sat it looks like some dependencies were missing) here is the output: and I should remark for next version of salome that there is an error in the output, if you see in the warning it says to install the dependencies and it mentions ‘fftw’ this is not recognized by apt install, and it even stoped my apt install, but if you remove that one and install all the rest and re run the sat it will be enought to have all the dependencies so, this ‘fftw’ should not be printed…
WARNING: Some run time system dependencies are missing!
Please install them with apt before running salome
missing run time dependencies : python3-babel python3-pytest-cython python3-jinja2 python3-sphinx python3-alabaster python3-certifi python3-cycler python3-dateutil python3-docutils fftw python3-imagesize python3-kiwisolver python3-markupsafe python3-matplotlib python3-mpi4py python3-nose python3-numpy python3-numpydoc python3-pandas python3-tz python3-requests libffi7 libopenblas0-serial python3-scipy python3-sip python3-stemmer python3-sphinx-rtd-theme python3-sphinxcontrib.websupport sphinx-intl python3-statsmodels python3-toml python3-urllib3
WARNING: Some compile time system dependencies are missing!
Please install them with apt before compiling salome
missing compile time dependencies : pyqt5-dev pyqt5-dev-tools libboost-all-dev libcppunit-dev libeigen3-dev fftw-dev libgraphviz-dev llvm-dev libqwt-qt5-dev libxpm-dev libtbb-dev cython3 libopenblas-dev qttools5-dev libqt5svg5-dev libqt5x11extras5-dev qtxmlpatterns5-dev-tools libtiff5-dev dvipng python3-sip-dev python3-statsmodels
Indeed this should not be used in case of universal binary. This command is aimed for non universal distributions. This needs to be fixed.
Thanks
Regards.