I have created a virtual environment containing packages I need for some python out of tree blocks. When I activate the virtual environment and attempt to run the flowgraph from companion, it complains that the special packages I included in my virtual environment cannot be found.
Interestingly, I can successfully run from the command line the .py version of the flowgraph automatically generated by GnuRadio Companion.
How can I get this to work under Gnu Radio Companion?
As a specific example, I created a virtual environment containing the pandas package and attempted to import pandas in a no_block type custom python block originally created with gr_modtool. I did the install with the virtual environment activated. While running the flowgraph from the command line works fine, I get the following error when attempting to run the same flowgraph from GRC (which was opened from the command line with the virtual environment activated):
Traceback (most recent call last):
File "/home/my_name/devel/gr-my_oot_module/examples/my_flowgraph.py", line 35, in <module>
import my_oot_module
File "/home/my_name/devel/gnuradio3_8/lib/python3.6/dist-packages/my_oot_module/__init__.py", line 39, in <module>
from .my_noblock_block import my_noblock_block
File "/home/my_name/devel/gnuradio3_8/lib/python3.6/dist-packages/my_oot_module/my_noblock_block.py", line 25, in <module>
import pandas
ModuleNotFoundError: No module named 'pandas'