start run-escript

Asked by Weimin Song

Dear all,

I installed the esys-escript, and in the fold 'bin', the document 'run-escript' and 'runmodel.py' were generated after the installation. I could run esys-escript in folder 'bin' by coding './run-escript', but I can not use the command 'run-escript' to do the running.

Should I make a set in the PATH or make a soft linking?

Your help will be greatly appreciated!!!

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Joel Fenwick
Solved:
Last query:
Last reply:
Revision history for this message
Joel Fenwick (j-fenwick1) said :
#1

Either one is fine.

Revision history for this message
Weimin Song (wsong8) said :
#2

I wrote a shell:

#!/bin/bash
/home/ubuntu/escript/run-escript

Then I put this file in the /usr/bin. And then the it seems 'run-escript' works, however, adding the python file after 'run-escript' ('run-escript myscript.py') does not give response, just the following information:

Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

It is so strange and difficult to figure it out!!!

Revision history for this message
Best Joel Fenwick (j-fenwick1) said :
#3

This won't work because you are not passing the script parameters through to run-escript.
You could fix this, but it might be simpler just to add the following line to your ~/.bashrc

export PATH=$PATH:/home/ubuntu/escript

Revision history for this message
Weimin Song (wsong8) said :
#4

Thanks Joel Fenwick, that solved my question.