An installing problem for a new user

Asked by Lou Jichao on 2019-01-10

Hi,
I am a new user, I have installed python-escript_5.2.tar.gz on ubuntu16.4 as the install guide with no problem
"sudo apt-get install python-dev python-numpy libboost-python-dev
sudo apt-get install libnetcdf-cxx-legacy-dev libnetcdf-c++4-dev
sudo apt-get install libnetcdf-dev libboost-random-dev
sudo apt-get install scons lsb-release
sudo apt-get install python-sympy python-matplotlib python-scipy
sudo apt-get install python-pyproj python-gdal gmsh"
And I execute:"scons -j1 options_file=scons/templates/xenial_options.py"
scons: Reading SConscript files ...
Using options in scons/templates/xenial_options.py.
sh: 1: svnversion: not found
Checking whether the C++ compiler works... (cached) yes
Checking for C++ function gethostname()... (cached) yes
Checking for C++ header file byteswap.h... (cached) yes
Checking for C++ function SCbswap32()... (cached) yes
Checking for C++ header file sys/endian.h... (cached) no
Checking for C++ header file libkern/OSByteOrder.h... (cached) no
Checking for working complex std::acos()... (cached) yes
Checking for C++ header file Python.h... (cached) yes
Checking for C++ function Py_Exit()... (cached) yes
Checking for C++ library boost_python-py27... (cached) yes
Checking for C++ header file numpy/ndarrayobject.h... (cached) yes
Checking for C++ library netcdf_c++... (cached) yes
Checking for C++ library boost_iostreams... (cached) no
Chmod("utest.sh", 0755)
Generated utest.sh.
Chmod("itest.sh", 0755)
Generated itest.sh.
Chmod("/home/ljc/escript/src/bin/run-escript", 0755)
Delete(["lib/pythonMPI", "lib/pythonMPIredirect"])
Delete("bin/escript-overlord")
scons: done reading SConscript files.
scons: Building targets ...
/home/ljc/escript/src/bin/run-escript /home/ljc/escript/src/build/scripts/release_sanity.py
scons: done building targets.
*** Config Summary (see config.log and <prefix>/lib/buildvars for details) ***
Escript revision -2
  Install prefix: /home/ljc/escript/src
          Python: /usr/bin/python (Version 2.7.12)
           boost: /usr (Version 1.58.0)
           numpy: YES (with headers)
            gmsh: YES, MPI-ENABLED
  Solver library: paso
   Direct solver: NONE
         domains: dudley, finley, ripley, speckley
          netcdf: YES (3)
           weipa: YES
          openmp: YES
            gdal: YES
          pyproj: YES
           scipy: YES
           sympy: YES

  DISABLED features: boomeramg cppunit cuda debug gzip lapack mkl mpi papi parmetis silo trilinos umfpack visit
  Treating warnings as errors
SUCCESS: build complete
But when I execute "run-escript example01a.py" in the example file
It turns:
run-escript: can not find the command
 So what should I do next.
Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Ellery
Solved:
2019-01-12
Last query:
2019-01-12
Last reply:
2019-01-11

This question was reopened

Manfred Hampl (m-hampl) said : #1

See install.pdf, Chapter 2.4
"You can run escript using path_to_escript_files/bin/run-escript.
Where path_to_escript_files is replaced with the real path."

see a snippet from your build log:

scons: Building targets ...
/home/ljc/escript/src/bin/run-escript /home/ljc/escript/src/build/scripts/release_sanity.py
scons: done building targets.

run-escript seems to be located in /home/ljc/escript/src/bin, so you can start it by using

~/escript/src/bin/run-escript

Lou Jichao (ljc-1) said : #2

Thanks Manfred Hampl, that solved my question.

Lou Jichao (ljc-1) said : #3

And what should I do, if I want to use the "python example01a.py"?

Best Adam Ellery (aellery) said : #4

To run escript on a file, type

~/escript/src/bin/run-escript [file]

where [file] tells escript where the file is located. For example, if you wish to run on example01a.py, you can type:

~/escript/src/bin/run-escript ~/escript/src/doc/examples/cookbook/example01a.py

Lou Jichao (ljc-1) said : #5

Thanks Adam Ellery, that solved my question.