Skip to content

Commit

Permalink
changed installation instructions; version 2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptorron committed May 3, 2024
1 parent a35d590 commit 12e7103
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.6.2
- fixed ROWORDER attribute in FITS files (KStars/EKOS ignores this but some postprocessing tools need this fix to
have the Bayer pattern in the correct order)
- more details in install_requires of the wheel
- adapted install instructions in README.md to meet newer OS versions (installation in virtual environment)
- removed indi_pylibcamera_postinstall from installation: does not work from virtual environment

2.6.0
- support for monochrome cameras
- support for new raw and RGB frame formats (including monochrome)
Expand Down
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camera.

## Requirements and installation
Some packages need to be installed with apt-get:
- `libcamera` (if not already installed). You can test libcamera and the support
- `libcamera` and `libcamera-apps` (if not already installed). You can test libcamera and the support
for your camera with:
```commandline
libcamera-hello --list-cameras
Expand All @@ -52,36 +52,42 @@ for your camera with:
by yourself. Instructions can be found here: https://github.com/indilib/indi. 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`.
Finally, after installation, you need to have a working INDI server: `indiserver -v indi_simulator_telescope`
- The Python packages `picamera2`, `numpy`, `lxml` and `astropy`. Theoretically these packages can be installed with `pip`.
But at least the version of `picamera2` must fit to the `libcamera` you installed with `apt-get`. Therefore it is
safer to install these Python packages with `apt-get` too.

The command line to install all is:
- The Python packages `PyQt5`, `picamera2` and `numpy` must be installed with `apt-get`. Typically they are already
installed. If not you can install them with:
```commandline
sudo apt-get install libcamera-apps indi-bin python3-picamera2 python3-lxml python3-astropy python3-numpy
sudo apt-get install python3-picamera2 python3-pyqt5 python3-numpy
```

The `indi_pylibcamera` driver package is available on PyPi. Please install with:
The Raspberry PI OS requires a virtual environment to install non-system Python packages. Trying to install
`indi_pylibcamera` without a virtual environment will fail with `error: externally-managed-environment`.

Run the following on a command line to install `indi_pylibcamera`in a virtual environment called `venv_indi_pylibcamera`:
```commandline
sudo pip3 install indi_pylibcamera
sudo indi_pylibcamera_postinstall
python3 -m venv --system-site-packages ~/venv_indi_pylibcamera
source ~/venv_indi_pylibcamera/bin/activate
pip install --upgrade pip
pip install indi_pylibcamera
```

The `indi_pylibcamera_postinstall` script creates in `/usr/share/indi` a symbolic link to the driver XML. That makes
the driver available in the KStars/EKOS profile editor in "CCD"->"OTHERS". Not all versions ov KStars/ECOS support this
(for instance it works with KStars 3.6.5 but not with KStars 3.4.3).

## Uninstall
For uninstalling the driver do:
```commandline
sudo rm -f /usr/share/indi/indi_pylibcamera.xml
sudo pip3 uninstall indi_pylibcamera
rm -rf ~/venv_indi_pylibcamera
```

## Running
You can start the INDI server with `indiserver -v indi_pylibcamera`. When the server is running you can connect to
the server from another computer with an INDI client (for instance KStars/EKOS). The camera name is the one
you configure in `indi_pylibcamera.ini`.
At the moment there is no support to start the driver from the EKOS profile editor.
The driver and the indi server must be started in shell with activated virtual environment:
```commandline
source ~/venv_indi_pylibcamera/bin/activate
```

In the same shell you can start the INDI server with `indiserver -v indi_pylibcamera`. When the server is running
you can connect to the server from another computer with an INDI client (for instance KStars/EKOS). The camera name
is the one you configure in `indi_pylibcamera.ini`.

I recommend you to make a wrapper script to activate the environment and start the driver.

## Global Configuration
The driver uses a hierarchy of configuration files to set global parameter. These configuration files are loaded in the
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ twine check dist/*
# after upload the package will be visible in https://test.pypi.org/project/indi_pylibcamera
# to test the pip installation from TestPyPi:
# - USE APT_GET TO INSTALL REQUIREMENTS!
# sudo apt-get install indi-bin python3-picamera2 python3-lxml python3-astropy
# sudo apt-get install indi-bin python3-picamera2 python3-lxml
# - install in virtual environment
# python3 -m venv --system-site-packages /home/cam/test_iplc
# source test_iplc/bin/activate
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ packages = find:
include_package_data = True
python_requires = >=3.7
install_requires =
picamera2
lxml
astropy
numpy>=1.24
astropy>=5.2
picamera2>=0.3

[options.packages.find]
where=src
Expand Down
2 changes: 1 addition & 1 deletion src/indi_pylibcamera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
INDI driver for libcamera supported cameras
"""

__version__ = "2.6.0"
__version__ = "2.6.2"
2 changes: 1 addition & 1 deletion src/indi_pylibcamera/indi_pylibcamera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<devGroup group="CCDs">
<device label="INDI pylibcamera">
<driver name="INDI pylibcamera">indi_pylibcamera</driver>
<version>2.6.0</version>
<version>2.6.2</version>
</device>
</devGroup>
</driversList>

0 comments on commit 12e7103

Please sign in to comment.