Page 1 of 2

Openastro (Solved)

PostPosted: Aug 16th, '19, 22:10
by GersonLearchman
Good day to all, I am a newbie in this forum and I am lost, I do not master English use Google translator; I wish I could install this package that is the only one I found for GNU/Linux and used it perfectly with MX and now that I installed Mageia 7.1 I want to continue using it, if you can help me I will be grateful:
https://www.openastro.org

Re: Openastro

PostPosted: Aug 17th, '19, 14:32
by doktor5000
Well, you probably need to compile it yourself, see the instructions at https://www.openastro.org/?Download#GenericLinux

Generic Linux Installation
You can also manually build openastro.org, the pyswisseph module and the ephemeris files.

Make sure you can get these dependencies satisfied to run the program:

python3-dateutil
gir1.2-rsvg-2.0
gir1.2-gtk-3.0
python3-tz
python3-dev
python3-cairo
imagemagick
librsvg2-bin
curl -L "http://www.openastro.org/download.php?file=source&type=python3-swisseph" | tar xz

cd python3-swisseph-2.00.00 && sudo python3 setup.py install

curl -L "http://www.openastro.org/download.php?file=source&type=openastro" | tar xz

cd openastro.org-1.1.57 && sudo python3 setup.py install --prefix=/usr

curl -L "http://www.openastro.org/download.php?file=source&type=data" | tar xz

cd openastro.org-data-1.9 && sudo python3 setup.py install --prefix=/usr
To run the program type "openastro" in a terminal



There are also RPM packages for Fedora which you could try as well, although I'm not sure they also provide the required python dependencies: https://pkgs.org/download/openastro

Re: Openastro

PostPosted: Aug 17th, '19, 22:04
by GersonLearchman
Thanks @doktor5000for the answer, I installed everything but I still can't make it work.
What chance is there that someone could compile it for the Mageia repository?
I would be grateful for the contribution, is the only software of this type that there is for GNU/Linux

Re: Openastro

PostPosted: Aug 18th, '19, 01:50
by doktor5000
GersonLearchman wrote:I installed everything but I still can't make it work.

And what's the error message when you try to start it ?

Re: Openastro

PostPosted: Aug 18th, '19, 15:45
by GersonLearchman
There's no error message, it just doesn't start.
I think we need to correct this but I don't know how to do it.
Spoiler:
[root@localhost python3-swisseph-2.00.00]# python3 setup.py install
Searching system libswe...
Found pkg-config
Using internal libswe
running install
running build
running build_ext
building 'swisseph' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/libswe
creating build/temp.linux-x86_64-3.7/swephelp
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ilibswe -Iswephelp -I/usr/include/python3.7m -c pyswisseph.c -o build/temp.linux-x86_64-3.7/pyswisseph.o -std=gnu99
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
[root@localhost python3-swisseph-2.00.00]#

Re: Openastro

PostPosted: Aug 18th, '19, 19:19
by GersonLearchman
If I run it in the terminal, throw this:
Spoiler:
[root@localhost gerson]# openastro
Traceback (most recent call last):
File "/usr/bin/openastro", line 21, in <module>
import math, sys, os.path, datetime, socket, gettext, codecs, webbrowser, pytz
ModuleNotFoundError: No module named 'pytz'
[root@localhost gerson]#

Re: Openastro

PostPosted: Aug 19th, '19, 18:40
by doktor5000
Well, the error messages are pretty clear:

unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1


You don't have a compiler ( see https://en.wikipedia.org/wiki/GNU_Compiler_Collection ) installed and hence installation fails at executing that.
Try again after installing the package task-c++-devel : https://madb.mageia.org/package/show/so ... B%2B-devel

ModuleNotFoundError: No module named 'pytz'

You are missing a python module. Try again after installing the package python-pytz: https://madb.mageia.org/package/show/na ... 0/source/1

Re: Openastro

PostPosted: Aug 19th, '19, 20:52
by GersonLearchman
I installed the package: task-c++-devel
then I ran and this is the result:
Spoiler:
[root@localhost python3-swisseph-2.00.00]# python3 setup.py install
Searching system libswe...
Found pkg-config
Using internal libswe
running install
running build
running build_ext
building 'swisseph' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ilibswe -Iswephelp -I/usr/include/python3.7m -c pyswisseph.c -o build/temp.linux-x86_64-3.7/pyswisseph.o -std=gnu99
pyswisseph.c:58:10: error fatal: Python.h: No existe el fichero o el directorio
#include <Python.h>
^~~~~~~~~~
compilación terminada.
error: command 'gcc' failed with exit status 1
[root@localhost python3-swisseph-2.00.00]#

Re: Openastro

PostPosted: Aug 19th, '19, 21:13
by GersonLearchman
Already with the 2 suggested packages installed, I re-run the entire installation procedure resulting in the error of the previous comment and also when running "openastro" from the terminal, this is the result:
Spoiler:
[root@localhost openastro.org-data-1.9]# openastro
Traceback (most recent call last):
File "/usr/bin/openastro", line 21, in <module>
import math, sys, os.path, datetime, socket, gettext, codecs, webbrowser, pytz
ModuleNotFoundError: No module named 'pytz'
[root@localhost openastro.org-data-1.9]#

Re: Openastro

PostPosted: Aug 20th, '19, 18:20
by doktor5000
GersonLearchman wrote:pyswisseph.c:58:10: error fatal: Python.h: No existe el fichero o el directorio

You're missing a package that contains the file Python.h. You can search such a package with
Code: Select all
urpmf Python.h


Try again after
Code: Select all
urpmi python-devel


GersonLearchman wrote:ModuleNotFoundError: No module named 'pytz'

Still the same error as before, seems you either didn't install the package, or openastro cannot find it.

You can try if you get the same error using the following (which starts a python shell and tries to import that module)
Code: Select all
python -c 'import pytz'

Re: Openastro

PostPosted: Aug 20th, '19, 19:45
by GersonLearchman
Thanks again, I followed the previous instructions, installed Python.h and also 'import pytz' and ran all over again to install Openastro but it's exactly the same, it shows the same errors again:
Code: Select all
# error: command 'gcc' failed with exit status 1
# ModuleNotFoundError: No module named 'pytz'

Re: Openastro

PostPosted: Aug 21st, '19, 19:21
by doktor5000
GersonLearchman wrote:[code]# error: command 'gcc' failed with exit status 1

That is only the summary result, the actual error / the cause is above that line.

Re: Openastro

PostPosted: Aug 21st, '19, 21:00
by GersonLearchman
What do I have to do to modify the line?

Re: Openastro

PostPosted: Aug 23rd, '19, 17:25
by doktor5000
Uhmm, I don't understand your question. If you still need help, post the whole output like you did above.

Re: Openastro

PostPosted: Aug 26th, '19, 13:57
by GersonLearchman
Good morning, I've done everything I've been suggested, but I still can not use the program, I already made:
# urpmf Python.h
# urpmi python-devel
And at the end of it all, this is the answer I get from the terminal:
Code: Select all
[root@localhost ghermain]# dnf install openastro
Última comprobación de caducidad de metadatos hecha hace 0:15:57, el lun 26 ago 2019 08:32:21 -03.
El paquete openastro-1.1.57-4.1.noarch ya está instalado.
Dependencias resueltas.
Nada por hacer.
¡Listo!
[root@localhost ghermain]# openastro
Traceback (most recent call last):
  File "/usr/bin/openastro", line 21, in <module>
    import math, sys, os.path, datetime, socket, gettext, codecs, webbrowser, pytz
ImportError: No module named pytz
[root@localhost ghermain]# python -c 'import pytz'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pytz
[root@localhost ghermain]#

Re: Openastro

PostPosted: Aug 26th, '19, 17:27
by doktor5000
GersonLearchman wrote:
[root@localhost ghermain]# openastro
Traceback (most recent call last):
File "/usr/bin/openastro", line 21, in <module>
import math, sys, os.path, datetime, socket, gettext, codecs, webbrowser, pytz
ImportError: No module named pytz

[root@localhost ghermain]# python -c 'import pytz'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pytz
[root@localhost ghermain]#


You still the same issue as before, seems you installed the wrong pytz package. You should have installed python-pytz, as suggested earlier.

Please show the output of
Code: Select all
rpm -q python python-pytz

Re: Openastro

PostPosted: Aug 27th, '19, 13:54
by GersonLearchman
It's next:
Code: Select all
[root@localhost ghermain]# rpm -q python python-pytz
python-2.7.16-2.mga7
el paquete python-pytz no está instalado
[root@localhost ghermain]#

Re: Openastro

PostPosted: Aug 30th, '19, 23:19
by doktor5000
GersonLearchman wrote:el paquete python-pytz no está instalado


This is exactly what the problem is, you don't have that package installed (which I suggested to install two times previously).
Install python-pytz and that problem is fixed.

Re: Openastro

PostPosted: Aug 31st, '19, 13:37
by GersonLearchman
I try to install the package "python-pytz" and then run "openastro" and this is the result:
Code: Select all
[root@localhost ghermain]# dnf install python-pytz
Última comprobación de caducidad de metadatos hecha hace 15:10:10, el vie 30 ago 2019 20:20:01 -03.
El paquete python2-pytz-2018.9-1.mga7.noarch ya está instalado.
Dependencias resueltas.
Nada por hacer.
¡Listo!
[root@localhost ghermain]# openastro
Traceback (most recent call last):
  File "/usr/bin/openastro", line 46, in <module>
    from openastromod import zonetab, geoname, importfile, dignities, swiss as ephemeris
  File "/usr/lib/python2.7/site-packages/openastromod/geoname.py", line 29, in <module>
    from urllib.request import urlopen
ImportError: No module named request
[root@localhost ghermain]#

It is very nice this distribution, ideal for my machine but without this program that I use constantly, I think I renounce it.
I have looked for all possible solutions on the internet, I understand some GNU/Linux but I am not an advanced computer technician.

Re: Openastro

PostPosted: Sep 1st, '19, 23:57
by doktor5000
GersonLearchman wrote:I have looked for all possible solutions on the internet, I understand some GNU/Linux but I am not an advanced computer technician.

Look, you don't have to be an advanced computer technician. The error message is clearly telling what the problem is, you are still missing python modules which are required by openastro or one of its components.

In this case
ImportError: No module named request

So install python-requests and that error goes away.

Re: Openastro

PostPosted: Sep 27th, '19, 14:19
by GersonLearchman
Definitely as much as I do everything to the letter and follow his instructions, I haven't been able to make it work. It would be a big help if you could pack it for Mageia. Is that possible?

Re: Openastro

PostPosted: Sep 28th, '19, 14:07
by doktor5000
GersonLearchman wrote:Definitely as much as I do everything to the letter and follow his instructions, I haven't been able to make it work.

So you installed the required python-requests package and it runs successfully now ?

Re: Openastro

PostPosted: Sep 28th, '19, 18:50
by GersonLearchman
It does not run. I installed all the packages that I asked one by one and in the end the program does not open.

Re: Openastro

PostPosted: Sep 29th, '19, 00:14
by doktor5000
And what is the output now ?

Re: Openastro (Solved)

PostPosted: Dec 24th, '19, 20:44
by GersonLearchman
OpenAstro (Astrology Software) Special thanks to Alejandro Vargas (@Anvanv) from the Telegram group who helped me install it, download here the instructions on how to do it.