Welcome, Guest
Username: Password: Remember me

TOPIC: installation problem

installation problem 11 years 8 months ago #7808

  • Termind
  • Termind's Avatar
It would help if you could be more specific about "invalid syntax error".

What is the exact wording and what other information is shown?
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7809

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Hi Termind,

I am trying to compile the whole TELEMAC system as per installation procedure (with Python) and when I typed in DOS Windows below
python compileTELEMAC.py-c winftn95 -f c:\opentelemac\v6p2\config\systel.cfg

then I get a message: SyntaxError: invalid syntax

thanks.

Violeta
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7811

  • Termind
  • Termind's Avatar
That message indicates an error in the Python source. But are there some lines before the message which indicate the incorrect line? What do they say?

Also, is it possible that you have more than one version of Python on your PC?

Try typing
python -V
as somebody said earlier. What is displayed?

Martin
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7815

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
HI Martin,

thanks for quick reply. When I tiped python compileTELEMAC..... and pressed enter then right after that I got a message SyntaxError: invalid syntax. and nothing else.
In terms of version , it gave me one line only Python 2.7.3.
there is a possibility that I did something wrong when I downloaded different files as I did it few times, but before I repeated the donwload I cleaned/uninstalled the previous one. Sounds messy. Thank you for your help.

Violeta
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7820

  • Termind
  • Termind's Avatar
Hi Violeta

I'm a beginner re Python & TELEMAC (but experienced in other languages). I struggled with some issues before I got past the compile step.

Firstly, it's good that
Python -V
reports
Python 2.7.3
.

But I remain puzzled that you can get a
SyntaxError: invalid syntax
message without any indication of the offending line.

My next suggestion is a simple test of your Python setup.

Just type
Python
and press Enter key.

At
>>>
prompt, type
1+1
Does that display 2?

Then type some rubbish such as
qq;&*
That should produce the
SyntaxError: invalid syntax
message. But is it preceded by messages indicating the bad line?

Type
exit()
to end your Python session.

Martin
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7821

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Hi Martin,

I am glad to know that not only me who had problems with installation:). Yes, you are right it should give me the line details. when I typed 1+1 it shown 2, but when I typed some rubbish, it told me that File"<stdin>", line 1 qq;&* SynaxError: invalid syntax.
So looks like when I am trying to compile it then it just shows the error without any details. Do you think it could be a problem with other settings in my pc or it is just about Python and SVN Telemac files? thanks.

Kind Regards!

Violeta
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7822

  • Termind
  • Termind's Avatar
OK, Violeta, there's probably nothing fundamentally wrong with your Python setup.

Next thing I suggest is that we check the compileTELEMAC.py file.

When you type the line starting
python compileTELEMAC.py

what is the current directory?

I would suggest that you should have the pytel sub-directory of your TELEMAC source directory as the current one.

The other thing to try is opening the compileTELEMAC.py file with Notepad.

Check that the lines are a reasonable length (not all strung together, for instance).

The first few lines should be
!/usr/bin/env python
"""@author Sebastien E. Bourban and Noemie Durand
"""
"""@note ... this work is based on a collaborative effort between

The last few lines should be
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# ~~~~ Jenkins' success message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   else: print '\n\nMy work is done\n\n'

   sys.exit()

Martin
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7824

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Hi Martin,

if I type compileTELEMAC.py or python compileTELEMAC.py directly in DOS Windows then it gives me the Syntax Error: invalid syntax.
When I went to the opentelemac folder then v6p2, there is a sub-folder pytel and it contain compile TELEMAC. I opened it with Notepad and saw exactly as you predicted, as per your file.
Just a guick question: where they Python should be stored? I left it where it was downloaded in C:\Python27\python but when I open the DOS Windows it shows automaticaly C:\Users\eg716469 , so it is different directory but it still gave me correct version type when I typed C:\Users\eg716469>python

Thanks.

Violeta
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7810

  • gourish
  • gourish's Avatar
Hi Voileta,

Put a space between py and -c so change "compileTELEMAC.py-c" to "compileTELEMAC.py -c"
so the command should be
python compileTELEMAC.py -c winftn95 -f c:\opentelemac\v6p2\config\systel.cfg

Best Regards,
Gourish
The administrator has disabled public write access.

installation problem 11 years 8 months ago #7813

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
thank you Gourish for your replay, but error is still same after I inserted the space. Could it be something to do with making changes in one of configuration files I did yesterday? Maybe something is missing on my pc? I installed Fortran, dowloaded Python 2.7.3, I have Mettis (I probably do not need it), I have PPICH, I got Fudaa, CMAKE 2.8. All as per instructions. Is there are anything else is missing? I am not sure. Thank you very much for your help.

Kind Regards!

Violeta
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.