Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2018-03-02 07:58:46

jestoup
Member
Registered: 2018-03-02
Posts: 5

salome_prerequisites.sh not found

Hi everyone,
first step and already I have an issue sad
I am trying installation of Salome, but I have the following errors, and no idea how to fix them.
Is anyone having this issue or understanding on how I could solve this?
Thank you

System: Ubuntu 16.04
Salome-meca: 2017.0.2


===============================================
Self Extracting salome_meca V2017.0.2 Installer
===============================================

Enter the salome_meca install directory [default=/home/jice/salome_meca] :
salome_meca is in English, do you want to be in French ? [y/N] : n
Installation of salome_meca V2017.0.2 in /home/jice/salome_meca/V2017.0.2 ...
    Verifying archive integrity...
All good.
Done                                                                                               
./create_appli.sh: line 108: /salome_prerequisites.sh: No such file or directory
./create_appli.sh: line 109: /salome_modules.sh: No such file or directory
Creating salome_meca application in /home/jice/salome_meca/appli_V2017.0.2 ...
sed: can't read /.config_appli_template.xml: No such file or directory
./create_appli.sh: line 129: 23279 Aborted                 (core dumped) python "${KERNELDIR}"/bin/salome/appli_gen.py > appli_V2017.0.2.log 2>&1
grep: salome_context.cfg: No such file or directory
salome_meca post-installation ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f8477c9d700 (most recent call first):
./create_appli.sh: line 240: 23284 Aborted                 (core dumped) python "${SALOMEDIR}"/salomemeca_custom_appli.py "${APPLIDIR}"
Warning: the directory ~/anaconda/bin is in a path variable but does not exist
./create_appli.sh: line 263: ./salome_post_install.py: No such file or directory
The salome_meca application was successfully created.
To run the application:
$ /home/jice/salome_meca/appli_V2017.0.2/salome
Adjusting wishexecutable /home/jice/salome_meca/V2017.0.2/tools/Code_aster_frontend-20170/etc/codeaster/profile.sh
Initialize terminal and editor for Code_aster

Last edited by jestoup (2018-03-02 08:01:24)

Offline

#2 2018-03-02 18:07:40

Thomas DE SOZA
Guru
From: EDF
Registered: 2007-11-23
Posts: 3,066

Re: salome_prerequisites.sh not found

Hello,

Could you post the output of

python --version

TdS

Offline

#3 2018-03-02 18:58:58

jestoup
Member
Registered: 2018-03-02
Posts: 5

Re: salome_prerequisites.sh not found

Hi Thomas,
thank you for your reply first of all.
I have installed python 2.7 and python 3.5 but when I do the command, here is the output.


Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.5.2 :: Continuum Analytics, Inc.

Offline

#4 2018-03-02 21:31:27

Thomas DE SOZA
Guru
From: EDF
Registered: 2007-11-23
Posts: 3,066

Re: salome_prerequisites.sh not found

Hello,

It seems like the system Python is being superseded by your custom installation.

I suggest you set the following before running the Salome-Meca installer (quick and dirty):

export PATH=/usr/bin:$PATH
alias python=/usr/bin/python2.7 (or whatever is the name of your Python2 executable)
unset PYTHONPATH
export PYTHONHOME=/usr

TdS

Offline

#5 2018-03-02 23:03:33

jestoup
Member
Registered: 2018-03-02
Posts: 5

Re: salome_prerequisites.sh not found

Thanks Thomas, you are a rockstar, it worked!
So I can run Salome-meca on my computer on python 2.7.

Some of my other programs were running on python3, and aren't running now as the default python has been set to python 2.7.
Do you have any idea on how to be able to switch between python 2.7 and 3.5 for each different program?

Offline

#6 2018-03-05 17:29:15

Thomas DE SOZA
Guru
From: EDF
Registered: 2007-11-23
Posts: 3,066

Re: salome_prerequisites.sh not found

Hello,

What I suggested, that is setting some environment variables, was supposedly only necessary inside a shell before launching the installer. That is you could have done that manually inside a one-shot terminal.

Once the software has been installed, you shouldn't need these instructions anymore and as such, Salome-Meca 2017 should not affect at all your existing Python installations (this is because Salome-Meca comes with its own Python distribution).

TdS

Offline

#7 2018-03-07 04:49:42

jestoup
Member
Registered: 2018-03-02
Posts: 5

Re: salome_prerequisites.sh not found

You are absolutely correct Thomas.
Thanks again.

Offline

#8 2018-06-29 21:26:20

JonasBanhos
Member
Registered: 2018-06-29
Posts: 1

Re: salome_prerequisites.sh not found

FYI, I had similar problem.
I noticed that during installation I only had Python3 installed. I installed python2 (sudo apt install python-minimal) and it was successfully installed.
Thanks for pointing out that the Python2 was the issue.

Thanks!

Offline

#9 2018-08-19 17:27:44

pksri31
Member
From: Finand
Registered: 2017-09-30
Posts: 2

Re: salome_prerequisites.sh not found

Thomas DE SOZA wrote:

Hello,

It seems like the system Python is being superseded by your custom installation.

I suggest you set the following before running the Salome-Meca installer (quick and dirty):

export PATH=/usr/bin:$PATH
alias python=/usr/bin/python2.7 (or whatever is the name of your Python2 executable)
unset PYTHONPATH
export PYTHONHOME=/usr

TdS

Hi Thomas,

I followed your suggestion and now the installation was good. However, the application is not launching! I tried to launch the application from the ./salome and I am getting below following error.

File "/home/kumar/salome_meca/appli_V2018/.salome_run", line 41
    print "ERROR: unexisting configuration/environment file(s): " + ', '.join(unexisting)
                                                                ^
SyntaxError: invalid syntax


I started by defining python 2.7 and I am getting the error as attached.
kumar@kumar-HP-Pavilion-dv6-Notebook-PC:~/salome_meca/appli_V2018$ export PATH=/usr/bin:$PATH
kumar@kumar-HP-Pavilion-dv6-Notebook-PC:~/salome_meca/appli_V2018$ alias python=/usr/bin/python2.7
kumar@kumar-HP-Pavilion-dv6-Notebook-PC:~/salome_meca/appli_V2018$ unset PYTHONPATH
kumar@kumar-HP-Pavilion-dv6-Notebook-PC:~/salome_meca/appli_V2018$ export PYTHONHOME=/usr
kumar@kumar-HP-Pavilion-dv6-Notebook-PC:~/salome_meca/appli_V2018$ ./salome
runSalome running on kumar-HP-Pavilion-dv6-Notebook-PC
Error when trying to access active network connections.
Traceback (most recent call last):
  File "/home/kumar/salome_meca/appli_V2018/bin/salome/PortManager.py", line 111, in __isNetworkConnectionActiveOnPort
    p = Popen(cmd, stdout=PIPE, stderr=STDOUT)
  File "/home/kumar/salome_meca/V2018/prerequisites/Python-2710/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/home/kumar/salome_meca/V2018/prerequisites/Python-2710/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Searching for a free port for naming service: 2814 - OK
Searching Naming Service + found in 0.1 seconds
Searching /Kernel/Session in Naming Service +++Gtk-Message: 20:18:22.922: Failed to load module "canberra-gtk-module"
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Warning: this type (SALOME_MED/MEDCouplingFieldDoubleCorbaInterface,objref) already exists, it will be ignored.
+Traceback (most recent call last):
  File "/home/kumar/salome_meca/appli_V2018/bin/salome/runSalome.py", line 633, in useSalome
    clt = startSalome(args, modules_list, modules_root_dir)
  File "/home/kumar/salome_meca/appli_V2018/bin/salome/runSalome.py", line 578, in startSalome
    session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
  File "/home/kumar/salome_meca/V2018/modules/KERNEL_V8_5_0/bin/salome/orbmodule.py", line 174, in waitNSPID
    raise RuntimeError, "Process %d for %s not found" % (thePID,theName)
RuntimeError: Process 18969 for /Kernel/Session not found


--- Error during Salome launch ---

Any  guidance would be helpful. Thank you so much

Last edited by pksri31 (2018-08-19 18:20:32)

Offline

#10 2018-09-18 17:19:43

yuan
Member
Registered: 2018-06-13
Posts: 16

Re: salome_prerequisites.sh not found

I was also having the same issue when installing SM2018 LGPL-2. My OS is ubuntu 18.04 on virtualbox 5.2.18.  I installed python2.7 and tried the following commands suggested by Thomas, but they did not work.
export PATH=/usr/bin:$PATH
alias python=/usr/bin/python2.7 (or whatever is the name of your Python2 executable)
unset PYTHONPATH
export PYTHONHOME=/usr

Any suggestions?

Thanks,
Yuan

Offline

#11 2018-09-19 12:14:37

yuan
Member
Registered: 2018-06-13
Posts: 16

Re: salome_prerequisites.sh not found

Problem solved by reinstalling python

Offline