Missing module

Asked by Flavio Caneparo on 2021-05-04

I've just installed OpenAstro on Linux, but when I try to run it, I get the following output on my terminal:

/usr/bin/openastro:1893: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 0 or i is 9 or i is 6 or i is 3:
/usr/bin/openastro:1893: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 0 or i is 9 or i is 6 or i is 3:
/usr/bin/openastro:1893: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 0 or i is 9 or i is 6 or i is 3:
/usr/bin/openastro:1893: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 0 or i is 9 or i is 6 or i is 3:
/usr/bin/openastro:4814: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if openAstro.aspects[i]['visible'] is 1:
/usr/bin/openastro:4818: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if openAstro.aspects[i]['visible_grid'] is 1:
/usr/bin/openastro:4923: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 11 or i is 13 or i is 14 or i is 21 or i is 22:
/usr/bin/openastro:4923: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 11 or i is 13 or i is 14 or i is 21 or i is 22:
/usr/bin/openastro:4923: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 11 or i is 13 or i is 14 or i is 21 or i is 22:
/usr/bin/openastro:4923: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 11 or i is 13 or i is 14 or i is 21 or i is 22:
/usr/bin/openastro:4923: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 11 or i is 13 or i is 14 or i is 21 or i is 22:
/usr/bin/openastro:4926: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 23 or i is 27:
/usr/bin/openastro:4926: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 23 or i is 27:
/usr/bin/openastro:4929: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if i is 27:
/usr/bin/openastro:4950: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if openAstro.planets[i]['visible'] is 1:
/usr/bin/openastro:4955: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if openAstro.planets[i]['visible_aspect_line'] is 1:
/usr/bin/openastro:4960: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if openAstro.planets[i]['visible_aspect_grid'] is 1:
Traceback (most recent call last):
  File "/usr/bin/openastro", line 46, in <module>
    from openastromod import zonetab, geoname, importfile, dignities, swiss as ephemeris
ModuleNotFoundError: No module named 'openastromod'

I have installed the Swiss Ephmeris extension and OpenAstro.org-data. Is there something here I'm missing? Or do I have to change something in the source code to make it work?
I'm using Debian btw.

Thank in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenAstro.org Edit question
Assignee:
No assignee Edit question
Solved by:
Dominique Guardiola
Solved:
Last query:
Last reply:
Best Dominique Guardiola (onlefay) said : #1

Hello Flavio
I have this problem with Ubuntu 20.10
I just added
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3.8/site-packages/
to my .bashrc file
Now it loads the openastromod, but then I get other python execution errors, I should fill a report......

Dominique Guardiola (onlefay) said : #2

I linked to related bug, it's explained there

Flavio Caneparo (fcaneparo) said : #4

Hi Dominique

Thanks for your help :)

I just tried a similar approach ie I copied the openastromod folder from /usr/lib/python3.6/dist-packages to /usr/lib/python3.9/dist-packages.

Now it does recognize the openastromod module, but it's throwing the ImportError undefined symbol: _Py_ZeroStruct.

I guess it's a compatibility issue? :\

Anyway, what error are you getting there?

Dominique Guardiola (onlefay) said : #5

I opened up bug #1927543 to explain the errors I have later
I think moving the folder is not a clean solution, site-packages is an important place for python, you should not move anything
See answer https://bugs.launchpad.net/bugs/1840698 for the best approach (modifying the python version folder in the code)