mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Msieve (https://www.mersenneforum.org/forumdisplay.php?f=83)
-   -   N00b question (https://www.mersenneforum.org/showthread.php?t=20329)

ThomRuley 2015-06-27 05:03

N00b question
 
Installing ggnfs on Ubuntu 14.04.

Looks like I have all the needed files. Put a copy of factmsieve.py in the example directory just like I did when I ran this on Windows. Not sure if I got the directory path correct in factmsieve:

Still not sure how to get the directory path in the terminal yet (also a noob there), but the GUI has a home folder, which contains ggnfs. Would that mean c:/home/ggnfs/example?

I have tried to start the program both in terminal and in python. Here were the results:

elgato127@elgato127-VGN-NW220F:~$ python3
Python 3.4.0 (default, Jun 19 2015, 14:20:21)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> factmsieve.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'factmsieve' is not defined
>>> factmsieve.py example.n
File "<stdin>", line 1
factmsieve.py example.n
^
SyntaxError: invalid syntax
>>> dir
<built-in function dir>
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> exit()
elgato127@elgato127-VGN-NW220F:~$ dir
Desktop examples.desktop gPodder Pictures SumofList.py workspace
Documents factorial.py mprime Program.py Templates
Downloads ggnfs Music Public Videos
elgato127@elgato127-VGN-NW220F:~$ cd ggnfs
elgato127@elgato127-VGN-NW220F:~/ggnfs$ dir
Changelog example ggnfs.vc INSTALL src Version
contrib factmsieve.py include LICENSE tests
doc factmsieve.py~ include-extra Makefile todo.txt
elgato127@elgato127-VGN-NW220F:~/ggnfs$ cd example
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ factmsieve.py example.n
factmsieve.py: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ cp factmsieve.py /example
cp: cannot stat ‘factmsieve.py’: No such file or directory
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ factmsieve.py example.n
factmsieve.py: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ factmsieve.py example
factmsieve.py: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ cd.
No command 'cd.' found, did you mean:
Command 'cdo' from package 'cdo' (universe)
Command 'cdi' from package 'cdo' (universe)
Command 'cdp' from package 'irpas' (multiverse)
Command 'cdw' from package 'cdw' (universe)
Command 'cd5' from package 'cd5' (universe)
Command 'cde' from package 'cde' (universe)
Command 'cdb' from package 'tinycdb' (main)
Command 'cdv' from package 'codeville' (universe)
cd.: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ up
up: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ cd-
No command 'cd-' found, did you mean:
Command 'cdw' from package 'cdw' (universe)
Command 'cde' from package 'cde' (universe)
Command 'cdv' from package 'codeville' (universe)
Command 'cdo' from package 'cdo' (universe)
Command 'cdb' from package 'tinycdb' (main)
Command 'cdi' from package 'cdo' (universe)
Command 'cd5' from package 'cd5' (universe)
Command 'cdp' from package 'irpas' (multiverse)
cd-: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ cd~
No command 'cd~' found, did you mean:
Command 'cdw' from package 'cdw' (universe)
Command 'cdb' from package 'tinycdb' (main)
Command 'cde' from package 'cde' (universe)
Command 'cdo' from package 'cdo' (universe)
Command 'cdv' from package 'codeville' (universe)
Command 'cdi' from package 'cdo' (universe)
Command 'cd5' from package 'cd5' (universe)
Command 'cdp' from package 'irpas' (multiverse)
cd~: command not found
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ python3
Python 3.4.0 (default, Jun 19 2015, 14:20:21)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> factmsieve.py example
File "<stdin>", line 1
factmsieve.py example
^
SyntaxError: invalid syntax
>>> factmsieve.py example.n
File "<stdin>", line 1
factmsieve.py example.n
^
SyntaxError: invalid syntax
>>> factmsieve.py example.n
File "<stdin>", line 1
factmsieve.py example.n
^
SyntaxError: invalid syntax
>>> factmsieve.py example
File "<stdin>", line 1
factmsieve.py example
^
SyntaxError: invalid syntax
>>> factmsieve.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'factmsieve' is not defined
>>>

Clearly I'm doing something wrong here, but I have no idea what. Any suggestions?

Thanks

WraithX 2015-06-27 12:05

[QUOTE=ThomRuley;404880]Installing ggnfs on Ubuntu 14.04.

Looks like I have all the needed files. Put a copy of factmsieve.py in the example directory just like I did when I ran this on Windows. Not sure if I got the directory path correct in factmsieve:

Still not sure how to get the directory path in the terminal yet (also a noob there), but the GUI has a home folder, which contains ggnfs. Would that mean c:/home/ggnfs/example?

I have tried to start the program both in terminal and in python. Here were the results:

elgato127@elgato127-VGN-NW220F:~$ python3
Python 3.4.0 (default, Jun 19 2015, 14:20:21)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> factmsieve.py
NameError: name 'factmsieve' is not defined
<snip>-------------------------------------------------------------------
elgato127@elgato127-VGN-NW220F:~$ dir
Desktop examples.desktop gPodder Pictures SumofList.py workspace
Documents factorial.py mprime Program.py Templates
Downloads ggnfs Music Public Videos
elgato127@elgato127-VGN-NW220F:~$ cd ggnfs
elgato127@elgato127-VGN-NW220F:~/ggnfs$ dir
Changelog example ggnfs.vc INSTALL src Version
contrib factmsieve.py include LICENSE tests
doc factmsieve.py~ include-extra Makefile todo.txt
elgato127@elgato127-VGN-NW220F:~/ggnfs$ cd example
elgato127@elgato127-VGN-NW220F:~/ggnfs/example$ factmsieve.py example.n
factmsieve.py: command not found
<snip>-------------------------------------------------------------------
Clearly I'm doing something wrong here, but I have no idea what. Any suggestions?

Thanks[/QUOTE]
In Linux:
You can use the command "pwd" to see what your "present working directory" is.
The tilde symbol "~" is a shorthand way to represent your personal user directory.
You can use the "ls" command to get a listing of the contents of the current directory.
Using "ls -la" will show you more detailed information of the files in the current directory.
You know how to cd (change directory) into folders just fine.
There is a special link available that will take you up a level, to the parent folder. That command is: cd ..
Please note, there is a space between the "cd" and the ".."
.. is a special link to the parent folder.
. is a special link to the current folder you are in.
Usually just typing cd will take you directly to your home directory.

Don't try to run factmsieve.py from inside the python interpreter. Just running it from the command line will work once you have it all set up correctly.
It looks like your factmsieve.py is in the ggnfs folder. That is why, after you cd into the example folder, you get a "command not found" when trying to run factmsieve.py.
So, copy factmsieve.py into the example directory, setup the paths in that file to point to where your executables are, and then try to run it again. Let us know what errors you run into at that point.


All times are UTC. The time now is 00:58.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.