# Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

**URL:** <https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780>\
**Category:** Installation issues\
**Created:** [October 2, 2019, 2:53pm UTC](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780 "2019-10-02T14:53:37Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![iwan](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/i/87869e/32.png) [@iwan](https://code-saturne.org/forum/u/iwan)\
**Post date:** [October 8, 2019, 11:45pm UTC](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780/21 "2019-10-08T23:45:09Z")

</div>

Hello,

Sorry for the late response.

I have not tried them yet. I still have the same

```plaintext
No module _sysconfigdata_m_linux_x86_64-linux-gnu.py

```

error when I use shell session. There was no file named salome\_context in the UB18.04 installer.

I tried to make Salome Meca 2019 work. Asking to code-aster forum, the post installation step still requires python2.  
After SM2019 can be run, I tried to use salome shell session. The same error still occur.

Currently, I am moving to Pop\_OS 19.04 which is based on ubuntu 19.04 to see if the error persist.  
Probably should create a new thread.

Could you post a step by step by installation procedure using both salome shell and salome\_context?

Kind regards,  
Iwan

---

<div class="post-metadata">

**Author:** ![iwan](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/i/87869e/32.png) [@iwan](https://code-saturne.org/forum/u/iwan)\
**Post date:** [October 9, 2019, 3:36am UTC](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780/22 "2019-10-09T03:36:37Z")

</div>

Hello.

This is the status that I get on Pop OS 19.04.

code\_saturne 6.0.0 is used.

2 version of salome tested:

1. 9.3 Ubuntu 18.04
2. 9.3 universal (public.run)

For 9.3 Ubuntu 18.04:

- Different structure of directory
- There is no salome\_context file
- code saturne successfully “make” and “make install”
- ./code\_saturne gui runs succesfully
- ./code\_saturne salome return:

```plaintext
/bin/bash: line 4: /bin/salome/envSalome.py: No such file or directory

```

running salome shell session return:

```plaintext
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/urllib3/lib/python3.6/site-packages/site.py", line 73, in <module>
    __boot()
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/urllib3/lib/python3.6/site-packages/site.py", line 26, in __boot
    import imp # Avoid import loop in Python >= 3.3
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/Python/lib/python3.6/imp.py", line 27, in <module>
    import tokenize
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/Python/lib/python3.6/tokenize.py", line 33, in <module>
    import re
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/Python/lib/python3.6/re.py", line 123, in <module>
    import sre_compile
  File "/home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/Python/lib/python3.6/sre_compile.py", line 17, in <module>
    assert _sre.MAGIC == MAGIC, "SRE module mismatch"
AssertionError: SRE module mismatch

```

For universal source:

- Standard directory structure (Salome\_9.3 library and appli\_Salome\_9.3 folders)
- There is context\_salome file
- code\_saturne make returns:

```plaintext
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f00f38b2740 (most recent call first):
/bin/bash: line 1: 5989 Aborted (core dumped) /usr/bin/python3.7 /home/iwan/salome/Salome-V9_3_0-x86_64-univ/prerequisites/Omniorb-422/bin/omniidl -bcxx -Wba -nf -I/home/iwan/salome/Salome-V9_3_0-x86_64-univ/prerequisites/Omniorb-422/idl -I/home/iwan/salome/Salome-V9_3_0-x86_64-univ/modules/KERNEL_V9_3_0/idl/salome -I/home/iwan/salome/Salome-V9_3_0-x86_64-univ/modules/GUI_V9_3_0/idl/salome CFDSTUDY_Gen.idl
make[4]: *** [Makefile:1101: CFDSTUDY_GenSK.cc] Error 134
make[4]: Leaving directory '/home/iwan/code_saturne/code_saturne-6.0.0/salome/cfd_study/idl'
make[3]: *** [Makefile:640: all-recursive] Error 1
make[3]: Leaving directory '/home/iwan/code_saturne/code_saturne-6.0.0/salome/cfd_study'
make[2]: *** [Makefile:641: all-recursive] Error 1
make[2]: Leaving directory '/home/iwan/code_saturne/code_saturne-6.0.0/salome'
make[1]: *** [Makefile:1595: all-recursive] Error 1
make[1]: Leaving directory '/home/iwan/code_saturne/code_saturne-6.0.0'
make: *** [Makefile:1039: all] Error 2

```

- salome shell session return

```plaintext
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f2cda337f80 (most recent call first):

```

Configuring code\_saturne with python from salome stoppped at:

```plaintext
checking whether /home/iwan/salome/Salome-V9_3_0-x86_64-univ/prerequisites/Python-365/python3.6 version is >= "2.6"... no
configure: error: Python interpreter is too old

```

Kind regards,  
Iwan  
[config ub18.04.log](https://code-saturne.org/forum/uploads/short-url/1wIB9PV949gVqmQWxI4W5dCrTOs.log) (214 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [October 9, 2019, 8:46am UTC](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780/23 "2019-10-09T08:46:45Z")

</div>

Hello,

The Python detection error is strange, but since you seem to have forced PYTHON=/usr/bin/python3.7, while SALOME has its own Python 3.6, this may lead to the error.

If buiding code\_saturne under SALOME, you should use at least the same Python version as SALOME, and if possible, SALOME’s bundled Python.

Otherwise you can simply build code\_saturne independently of SALOME, using the SALOME libraries where needed (MED, HDF, …). In this case you will not have the full SALOME desktop integration, but it is not that useful anyways (compared to the SALOME libraries). The only cases wher you really need this is if you need to do coupling with code\_aster (in wich case you would be building with salome\_meca), or if you need the OpenTURNS integration (available in the EDF build of SALOME, not in the generic build).

We should provide a native Ubuntu 18.04 build soon, but I do not have or master the build scripts for that yet…

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![iwan](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/i/87869e/32.png) [@iwan](https://code-saturne.org/forum/u/iwan)\
**Post date:** [October 9, 2019, 9:42am UTC](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780/24 "2019-10-09T09:42:10Z")

</div>

> [@](#):
>
> If buiding code\_saturne under SALOME, you should use at least the same Python version as SALOME, and if possible, SALOME’s bundled Python.

I already try it and it stopped at

```plaintext
checking whether /home/iwan/salome/Salome-V9_3_0-x86_64-univ/prerequisites/Python-365/python3.6 version is >= "2.6"... no
configure: error: Python interpreter is too old

```

edit: path correction

```plaintext
checking whether home/iwan/salome_meca/V2019_univ/prerequisites/Python-365/bin/python3.6 version is >= "2.6"... no
configure: error: Python interpreter is too old

```

Will try again in 18.04 then.

Kind regards,  
Iwan

[Previous page](https://code-saturne.org/forum/t/issue-when-installing-cs-6-0-0-with-salome-ubuntu-18-04/1780.md?page=1)
