Closed AlexKurek closed 2 months ago
This is happening because the recipe builds against the most recent version of Python (3.12) no matter what you might specify on the command line, and digital_rf
doesn't yet have a release that is compatible with Python 3.12. I put together a fix that makes the conda package independent of the Python version, so it will work even without an update to digital_rf
.
@ryanvolz After installing like so:
conda install conda-build conda-verify
git clone -b update-conda-recipe https://github.com/ryanvolz/srt-py
conda create -y --name srtpy
conda activate srtpy
conda build srt-py --channel conda-forge --no-test
conda build purge
mkdir srtpy-config/
cp /home/kurek/srt-py/config/* ~/srtpy-config/
rm -rf ~/srt-py/
conda deactivate
Im trying to run it:
conda activate srtpy
python ./miniconda3/pkgs/srt-py-1.1.1-py_0/python-scripts/srt_runner.py --config_dir=~/srtpy-config/
and getting:
File "./miniconda3/pkgs/srt-py-1.1.1-py_0/python-scripts/srt_runner.py", line 12, in <module>
from waitress import serve
ImportError: No module named waitress
Doing:
conda list srtpy
returns empty list.
When I do both
conda activate base
conda activate srtpy
Im getting:
File "/home/kurek/./miniconda3/pkgs/srt-py-1.1.1-py_0/python-scripts/srt_runner.py", line 13, in <module>
from srt import config_loader
ImportError: cannot import name 'config_loader' from 'srt' (/home/kurek/miniconda3/envs/srtpy/lib/python3.12/site-packages/srt.py)
There's nothing in your srtpy
environment because you're missing the step of installing the package that you built:
conda install --use-local srt-py
I should update the README too once we have a list of steps that work.
Ok, thank you. So now it is:
conda update -y --all
conda install -y conda-build conda-verify
git clone -b update-conda-recipe https://github.com/ryanvolz/srt-py
conda create -y --name srtpy
conda activate srtpy
conda build srt-py --channel conda-forge --no-test
conda install --use-local srt-py
and Im getting:
Channels:
- local
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed
LibMambaUnsatisfiableError: Encountered problems while solving:
- nothing provides dash-bootstrap-components needed by srt-py-1.1.1-py_0
Could not solve for environment specs
The following package could not be installed
└─ srt-py is not installable because it requires
└─ dash-bootstrap-components, which does not exist (perhaps a missing channel).
Not having the conda-forge channel by default is what's causing this error now. How about this sequence:
(navigate to srt-py directory)
conda install conda-build conda-verify
conda build -c conda-forge recipe
conda create -n srtpy
conda activate srtpy
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install --use-local srt-py
This sequence is working.
In summary, this is what I have to do on Ubuntu 22 to start SRT-Py:
# conda update -y --all
conda install -y conda-build conda-verify
git clone -b update-conda-recipe https://github.com/ryanvolz/srt-py # https://github.com/MITHaystack/srt-py/issues/19#issuecomment-1930609080
conda build -c conda-forge srt-py # --no-test
conda create -y -n srtpy
conda activate srtpy
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install -y --use-local srt-py
mkdir srtpy-config/
cp -r ~/srt-py/config/{config.yaml,schema.yaml,sky_coords.csv} ~/srtpy-config/
cp -r ~/srt-py/examples/example_cmd_file.txt ~/
rm -rf ~/srt-py/
sudo ln -s ~/miniconda3/envs/srtpy/lib/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/ # enable udev device setup of rtl-sdr hardware
sudo udevadm control --reload && sudo udevadm trigger # reload your udev rules
conda deactivate
conda build purge
sudo apt purge brltty # https://askubuntu.com/questions/1403705/dev-ttyusb0-not-present-in-ubuntu-22-04
sudo rm -rv /var/lib/BrlAPI/
sudo usermod -a -G tty,dialout $USER # https://github.com/esp8266/source-code-examples/issues/26#issuecomment-320999460 proper logout required after this
I have updated the installation instructions in my fork: https://github.com/AlexKurek/srt-py/blob/master/README.md#building-the-conda-package-locally
conda build srt-py
does not work due to dependency issues:I also could not build it using:
conda build srt-py --channel conda-forge --python 3.11.7
norconda build srt-py --channel conda-forge --python 3.10.13