Python Forum
Adding to python environment in pyenv virtual project - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: Adding to python environment in pyenv virtual project (/thread-37544.html)



Adding to python environment in pyenv virtual project - Larz60+ - Jun-23-2022

I have a virtual environment that uses pyenv python 3.10.4.

Gnu radio is installed in /usr/.../gnuradio

Normally, you would export the PYTHONPATH environment variable in .bashrc to point to the gnuradio library.

However, the only version of python 3.10.4 that I have on my system is located in the .pyenv directory, so I don't think that will work in this instance, and (if possible) I'd like to make gnuradio visible to this project alone.

How can I make gnuradio visible to python only for the pyenv project virtual environment?

Worst case (I guess), is to copy the gnuradio files to the project (rather not do that as it's kludgy).

Any help appreciated.


RE: Adding to python environment in pyenv virtual project - Gribouillis - Jun-25-2022

Try to extend sys.path in the environment's sitecustomize.py file. Don't use PYTHONPATH.


RE: Adding to python environment in pyenv virtual project - Larz60+ - Jun-25-2022

I'll give it a go and let you know, sounds like a winner.


RE: Adding to python environment in pyenv virtual project - Gribouillis - Jun-26-2022

I didn't know gnuradio. It looks very appealing. I add it to my ever growing list of things to think about when I find the time to look into them.


RE: Adding to python environment in pyenv virtual project - Larz60+ - Jun-26-2022

(Jun-26-2022, 09:04 AM)Gribouillis Wrote: I didn't know gnuradio. It looks very appealing. I add it to my ever growing list of things to think about when I find the time to look into them.
I will use gnuradio in conjunction with PLSDR, and an
This package, written in Python, on initial review looks promising.

The software that I am using now (CubicSDR), image below, works but is difficult to use. The device I am using is the "TRL2832U R820T2 TCXO+BIAS T+HF" and see About cost with antenna and mini-tripod around $30. Be careful (as in about page), as there are a lot of inferior products available.

Thanks for your suggestion, I will be hopefully getting all of this working with PLSDR today or in the next few days.

[attachment=1813]