Willy replied to the topic 'pyindi-client won't build/install' in the forum. 10 months ago

Thank you so much Aaron for your input - I eventually successfully compiled the whole thing last night (even drivers I don't need right now, just in case). I can now load PyIndi in my scripts, so far so good it works as expected :)

Unfortunately I noticed your reply regarding your script at a later time :/ Thank you for this, this may come in handy If I have to do again from scratch

Again, thank you for your help

Read More...

Willy replied to the topic 'pyindi-client won't build/install' in the forum. 10 months ago

Oh I didn't think this would be feasible, because of dependencies - I do hope this is gonna be ok

This means I would have to compile all the drivers I use as well ?

Thanks for the help : )

Read More...

Willy replied to the topic 'pyindi-client won't build/install' in the forum. 10 months ago

Sure ! Thanks :)

Read More...

Willy created a new topic ' pyindi-client won't build/install' in the forum. 10 months ago

Hello all

I'm a happy indi user since a long time, and I recently noticed there was a package named pyindi-client, and since I added Python to the list of scripting languages I use at work, I decided to explore and see what new features I could add to my setup thanks to Python scripting.

I'm running indi 1.8.8 from debian 11.7 on a raspberry pi zero W, and so far so good it works just fine.
I started by typing "pip3 install pyindi-client", like I usually do when I need a specific python module. It didn't go well :

$ pip3 install pyindi-client
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyindi-client
  Using cached pyindi-client-1.9.1.tar.gz (18 kB)
Building wheels for collected packages: pyindi-client
  Building wheel for pyindi-client (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-lis72j6u
       cwd: /tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/
  Complete output (30 lines):
  /usr/lib/python3/dist-packages/setuptools/dist.py:461: UserWarning: Normalizing 'v1.9.1' to '1.9.1'
    warnings.warn(tmpl.format(**locals()))
  running bdist_wheel
  running build
  running build_ext
  building '_PyIndi' extension
  swigging indiclientpython.i to indiclientpython_wrap.cpp
  swig -python -v -Wall -c++ -threads -I/usr/include -I/usr/include/libindi -I/usr/local/include/libindi -o indiclientpython_wrap.cpp indiclientpython.i
  indiclientpython.i:41: Error: Unable to find 'indimacros.h'
  indiclientpython.i:47: Error: Unable to find 'indiwidgettraits.h'
  indiclientpython.i:56: Error: Unable to find 'indipropertyview.h'
  indiclientpython.i:104: Error: Unable to find 'indipropertybasic.h'
  indiclientpython.i:122: Error: Unable to find 'indipropertytext.h'
  indiclientpython.i:123: Error: Unable to find 'indipropertynumber.h'
  indiclientpython.i:124: Error: Unable to find 'indipropertyswitch.h'
  indiclientpython.i:125: Error: Unable to find 'indipropertylight.h'
  indiclientpython.i:126: Error: Unable to find 'indipropertyblob.h'
  indiclientpython.i:196: Error: Unable to find 'indiproperties.h'
  Language subdirectory: python
  Search paths:
     ./
     /usr/include/
     /usr/include/libindi/
     /usr/local/include/libindi/
     ./swig_lib/python/
     /usr/share/swig4.0/python/
     ./swig_lib/
     /usr/share/swig4.0/
  Preprocessing...
  error: command '/usr/bin/swig' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyindi-client
  Running setup.py clean for pyindi-client
Failed to build pyindi-client
Installing collected packages: pyindi-client
    Running setup.py install for pyindi-client ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ll3e1dy0/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/willy/.local/include/python3.9/pyindi-client
         cwd: /tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/
    Complete output (29 lines):
    /usr/lib/python3/dist-packages/setuptools/dist.py:461: UserWarning: Normalizing 'v1.9.1' to '1.9.1'
      warnings.warn(tmpl.format(**locals()))
    running install
    running build_ext
    building '_PyIndi' extension
    swigging indiclientpython.i to indiclientpython_wrap.cpp
    swig -python -v -Wall -c++ -threads -I/usr/include -I/usr/include/libindi -I/usr/local/include/libindi -o indiclientpython_wrap.cpp indiclientpython.i
    indiclientpython.i:41: Error: Unable to find 'indimacros.h'
    indiclientpython.i:47: Error: Unable to find 'indiwidgettraits.h'
    indiclientpython.i:56: Error: Unable to find 'indipropertyview.h'
    indiclientpython.i:104: Error: Unable to find 'indipropertybasic.h'
    indiclientpython.i:122: Error: Unable to find 'indipropertytext.h'
    indiclientpython.i:123: Error: Unable to find 'indipropertynumber.h'
    indiclientpython.i:124: Error: Unable to find 'indipropertyswitch.h'
    indiclientpython.i:125: Error: Unable to find 'indipropertylight.h'
    indiclientpython.i:126: Error: Unable to find 'indipropertyblob.h'
    indiclientpython.i:196: Error: Unable to find 'indiproperties.h'
    Language subdirectory: python
    Search paths:
       ./
       /usr/include/
       /usr/include/libindi/
       /usr/local/include/libindi/
       ./swig_lib/python/
       /usr/share/swig4.0/python/
       ./swig_lib/
       /usr/share/swig4.0/
    Preprocessing...
    error: command '/usr/bin/swig' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1m8w33lk/pyindi-client_03b7c0bfc8cf4f6b9fcd9537f4a5128c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ll3e1dy0/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/willy/.local/include/python3.9/pyindi-client Check the logs for full command output.

I've been litterally spending days trying to get pyindi-client installed, to no avail.

Out of the box, even when following requirements (libindi-dev) there are still missing files
Tried to install debian 12 on the raspberry so I can try with a newer version of indi but it won't boot - so I'm stuck for now with indi 1.8.8 and debian 11.7
I git cloned indi repo so I can have its libs, and be able to checkout specific versions (eg 1.8.8 to match my current indi version from deb 11.7 (v1.8.8)
I git cloned pyindi-client so I can try different versions as well, adding paths from my local indi cloned repo in setup.cfg
The goal here is to align everything so I can get a working pyindi-client, is this is ever possible

The best I can get so far (besides hundreds of lines of warnings) is when running gcc, but it stops at this step :
In file included from /usr/include/python3.9/Python.h:145,
                 from indiclientpython_wrap.cpp:180:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
This is the result I get when using v1.8.8 of indi libs and branch incomming/indipropertybasic

If I ever try the branch master of pyindi-client and libs from indi 1.8.8 :
$ python3 setup.py install
/usr/lib/python3/dist-packages/setuptools/dist.py:461: UserWarning: Normalizing 'v1.9.1' to '1.9.1'
  warnings.warn(tmpl.format(**locals()))
running install
running build_ext
building '_PyIndi' extension
swigging indiclientpython.i to indiclientpython_wrap.cpp
swig -python -v -Wall -c++ -threads -I/usr/include -I/usr/include/libindi -I/usr/local/include/libindi -I/usr/local/include/libindi -I/home/willy/indi/libs -I/home/willy/indi/libs/indiclient -I/home/willy/indi/libs/indibase -I/home/willy/indi/libs/indidevice -I/home/willy/indi/libs/indidevice/property -o indiclientpython_wrap.cpp indiclientpython.i
Language subdirectory: python
Search paths:
   ./
   /usr/include/
   /usr/include/libindi/
   /usr/local/include/libindi/
   /usr/local/include/libindi/
   /home/willy/indi/libs/
   /home/willy/indi/libs/indiclient/
   /home/willy/indi/libs/indibase/
   /home/willy/indi/libs/indidevice/
   /home/willy/indi/libs/indidevice/property/
   ./swig_lib/python/
   /usr/share/swig4.0/python/
   ./swig_lib/
   /usr/share/swig4.0/
Preprocessing...
indiclientpython.i:45: Error: Unable to find 'indimacros.h'
indiclientpython.i:51: Error: Unable to find 'indiwidgettraits.h'
indiclientpython.i:60: Error: Unable to find 'indipropertyview.h'
indiclientpython.i:109: Error: Unable to find 'indipropertybasic.h'
indiclientpython.i:128: Error: Unable to find 'indipropertytext.h'
indiclientpython.i:129: Error: Unable to find 'indipropertynumber.h'
indiclientpython.i:130: Error: Unable to find 'indipropertyswitch.h'
indiclientpython.i:131: Error: Unable to find 'indipropertylight.h'
indiclientpython.i:132: Error: Unable to find 'indipropertyblob.h'
indiclientpython.i:202: Error: Unable to find 'indiproperties.h'
error: command '/usr/bin/swig' failed with exit code 1

Using tag 0.2.8 :
$ python3 setup.py install
/usr/lib/python3/dist-packages/setuptools/dist.py:461: UserWarning: Normalizing '0.2.7b' to '0.2.7b0'
  warnings.warn(tmpl.format(**locals()))
running install
running build_ext
building '_PyIndi' extension
swigging indiclientpython.i to indiclientpython_wrap.cpp
swig -python -v -Wall -c++ -threads -I/usr/include -I/usr/include/libindi -I/usr/local/include/libindi -I/usr/local/include/libindi -I/home/willy/indi/libs -I/home/willy/indi/libs/indiclient -I/home/willy/indi/libs/indibase -I/home/willy/indi/libs/indidevice -I/home/willy/indi/libs/indidevice/property -o indiclientpython_wrap.cpp indiclientpython.i
Language subdirectory: python
Search paths:
   ./
   /usr/include/
   /usr/include/libindi/
   /usr/local/include/libindi/
   /usr/local/include/libindi/
   /home/willy/indi/libs/
   /home/willy/indi/libs/indiclient/
   /home/willy/indi/libs/indibase/
   /home/willy/indi/libs/indidevice/
   /home/willy/indi/libs/indidevice/property/
   ./swig_lib/python/
   /usr/share/swig4.0/python/
   ./swig_lib/
   /usr/share/swig4.0/
Preprocessing...
indiclientpython.i:40: Error: Unable to find 'indimacros.h'
indiclientpython.i:46: Error: Unable to find 'indiwidgettraits.h'
indiclientpython.i:55: Error: Unable to find 'indipropertyview.h'
indiclientpython.i:103: Error: Unable to find 'indipropertybasic.h'
indiclientpython.i:121: Error: Unable to find 'indipropertytext.h'
indiclientpython.i:122: Error: Unable to find 'indipropertynumber.h'
indiclientpython.i:123: Error: Unable to find 'indipropertyswitch.h'
indiclientpython.i:124: Error: Unable to find 'indipropertylight.h'
indiclientpython.i:125: Error: Unable to find 'indipropertyblob.h'
error: command '/usr/bin/swig' failed with exit code 1

... Oh well.
It should have been as simple as "pip3 install pyindi-client", but it's clearly not.
So, is there any chance I can find a way to get this working ? What version combo between indi, pyindi-client and debian, swig, system architecture, country, religion, voodoo spell, whatever is the one that makes it work ?
In other words, has pyindi-client ever worked at all, and if so what versions of all components were used ?
If this is a deadend for me (eg it works only on other hardware, OS versions, etc.), is there another way of using indi's API with a scripting language without having to fight during days for no results?

Sorry for being so irritated, but I really thought I would spend my time actually coding using the pyindi-client, not installing/building it.

Any help would be GREATLY appreciated :)

Thanks !

(Oh and all apologies for my bad english !)

Willy

Read More...