Skip to content

Commit ca26c1f

Browse files
committed
fixed installation (trouble with incompatible package versions)
1 parent 12e7103 commit ca26c1f

File tree

6 files changed

+44
-18
lines changed

6 files changed

+44
-18
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.6.3
2+
- fixed installation issues
3+
14
2.6.2
25
- fixed ROWORDER attribute in FITS files (KStars/EKOS ignores this but some postprocessing tools need this fix to
36
have the Bayer pattern in the correct order)

README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ And it can not work when the libcamera-tools (like `libcamera-hello` and `libcam
2626
camera.
2727

2828
## Requirements and installation
29-
Some packages need to be installed with apt-get:
29+
Some packages need to be installed with `apt`:
3030
- `libcamera` and `libcamera-apps` (if not already installed). You can test libcamera and the support
3131
for your camera with:
3232
```commandline
@@ -49,26 +49,47 @@ for your camera with:
4949
```
5050
Something with your libcamera or kernel driver installation will be wrong if this does not work.
5151
- Install INDI core library. If there is no pre-compiled package for your hardware you will need to compile it
52-
by yourself. Instructions can be found here: https://github.com/indilib/indi. A Raspberry Pi Zero does not
53-
have enough RAM to compile with 4 threads in parallel: you need to do `make -j1` instead of `make -j4`.
52+
by yourself. Instructions can be found here: https://github.com/indilib/indi.
53+
The scripts on https://gitea.nouspiro.space/nou/astro-soft-build automate compilation and installation.
54+
A Raspberry Pi Zero does not have enough RAM to compile with 4 threads in parallel: you need to do `make -j1` instead of `make -j4`.
5455
Finally, after installation, you need to have a working INDI server: `indiserver -v indi_simulator_telescope`
55-
- The Python packages `PyQt5`, `picamera2` and `numpy` must be installed with `apt-get`. Typically they are already
56-
installed. If not you can install them with:
56+
- Some Python packages require matching versions of system libraries. They must be installed with `apt`:
5757
```commandline
58-
sudo apt-get install python3-picamera2 python3-pyqt5 python3-numpy
58+
sudo apt install python3-pip libcamera-apps python3-picamera2 python3-lxml python3-astropy python3-numpy python3-venv
5959
```
6060

61-
The Raspberry PI OS requires a virtual environment to install non-system Python packages. Trying to install
61+
The Raspberry Pi OS "Bullseye" still allowed to install system wide with `sudo pip install indi_pylibcamera`.
62+
Since "Bookworm" a virtual environment is required to install non-system Python packages. Trying to install
6263
`indi_pylibcamera` without a virtual environment will fail with `error: externally-managed-environment`.
6364

64-
Run the following on a command line to install `indi_pylibcamera`in a virtual environment called `venv_indi_pylibcamera`:
65+
Run the following on a command line to install `indi_pylibcamera`in a virtual environment called `venv_indi_pylibcamera`
66+
(you can name the virtual environment as you want):
6567
```commandline
6668
python3 -m venv --system-site-packages ~/venv_indi_pylibcamera
6769
source ~/venv_indi_pylibcamera/bin/activate
6870
pip install --upgrade pip
6971
pip install indi_pylibcamera
7072
```
7173

74+
## Some hints when you get trouble
75+
The Python packages `picamera2`, `numpy`, and ` astropy` MUST be installed with `sudo apt install`.
76+
You MUST NOT update them with `pip`. When you get errors related to these packages you can:
77+
1. Check directory `~/.local/lib/python3.9/site-packages` if it contains one of these packages. If yes delete them!
78+
2. Check if `pip list` shows different version numbers than `apt list` for these packages:
79+
```commandline
80+
pip list | grep numpy
81+
apt list | grep numpy
82+
83+
pip list | grep astropy
84+
apt list | grep astropy
85+
86+
pip list | grep picamera2
87+
apt list | grep picamera2
88+
```
89+
If you see different versions for a package remove it with `pip uninstall` and reinstall it with
90+
`sudo apt reinstall`.
91+
3. Remove and recreate the virtual environment.
92+
7293
## Uninstall
7394
For uninstalling the driver do:
7495
```commandline

build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ twine check dist/*
2525
# python3 -m twine upload --repository testpypi dist/*
2626
# after upload the package will be visible in https://test.pypi.org/project/indi_pylibcamera
2727
# to test the pip installation from TestPyPi:
28-
# - USE APT_GET TO INSTALL REQUIREMENTS!
29-
# sudo apt-get install indi-bin python3-picamera2 python3-lxml
28+
# - USE APT TO INSTALL REQUIREMENTS!
29+
# sudo apt install python3-pip libcamera-apps python3-picamera2 python3-lxml python3-astropy python3-numpy python3-venv
3030
# - install in virtual environment
3131
# python3 -m venv --system-site-packages /home/cam/test_iplc
3232
# source test_iplc/bin/activate
33-
# python3 -m pip install --index-url https://test.pypi.org/simple/ indi_pylibcamera
33+
# pip install --upgrade pip
34+
# pip install --index-url https://test.pypi.org/simple/ indi_pylibcamera
3435
# indi_pylibcamera_print_camera_information
3536
# indi_pylibcamera
3637
# - clean-up after test:
@@ -45,7 +46,8 @@ twine check dist/*
4546
# - install in virtual environment
4647
# python3 -m venv --system-site-packages /home/cam/test_iplc
4748
# source test_iplc/bin/activate
48-
# python3 -m pip install indi_pylibcamera
49+
# pip install --upgrade pip
50+
# pip install indi_pylibcamera
4951
# indi_pylibcamera_print_camera_information
5052
# indi_pylibcamera
5153
# - clean-up after test:

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ package_dir=
1515
packages = find:
1616
include_package_data = True
1717
python_requires = >=3.7
18-
install_requires =
19-
numpy>=1.24
20-
astropy>=5.2
21-
picamera2>=0.3
18+
#install_requires =
19+
# numpy>=1.24
20+
# astropy>=5.2
21+
# picamera2>=0.3
2222

2323
[options.packages.find]
2424
where=src

src/indi_pylibcamera/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
INDI driver for libcamera supported cameras
33
"""
44

5-
__version__ = "2.6.2"
5+
__version__ = "2.6.3"

src/indi_pylibcamera/indi_pylibcamera.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<devGroup group="CCDs">
33
<device label="INDI pylibcamera">
44
<driver name="INDI pylibcamera">indi_pylibcamera</driver>
5-
<version>2.6.2</version>
5+
<version>2.6.3</version>
66
</device>
77
</devGroup>
88
</driversList>

0 commit comments

Comments
 (0)