lutusp / PLSDR

Software-defined radio application written in Python
GNU General Public License v3.0
156 stars 21 forks source link

plsdr will not start #4

Open imesg opened 6 years ago

imesg commented 6 years ago

This is the result of an command line start:

gene@go3:/usr/src/PLSDR# ./PLSDR.py Traceback (most recent call last): File "./PLSDR.py", line 32, in from gnuradio import gr ImportError: No module named 'gnuradio

gnuradio is installed. I need more clues.

Thanks for help

lutusp commented 6 years ago

gnuradio is installed.

Python can do a lot of pretty neat things, but it won't mislead you. If Python says gnuradio is not installed then ... gnuradio is not installed.

Perform this test. Open a command shell and type "python". Now you will see this:

   >>

Now type "import gnuradio". If gnuradio is accessible to Python, you won't see an error message. If gnuradio is not accessible to Python, you will see an error message, and the message has no connection to my program.

Also, PLSDR requires Python 2.x, but only because gnuradio requires Python 2.x (I would have used Python 3 if I could have). This might have a bearing on the error you're seeing.

I hope this helps.

imesg commented 5 years ago

lutusp; I would like to revisit this problem. I use gentoo which allows the installation of several version of python i.e. I have four versions:

gene@go:/usr/src/PLSDR# eselect python list Available Python interpreters, in order of preference: [1] python3.6 [2] python3.4 [3] python3.5 (fallback) [4] python2.7 (fallback)

So I changed all occurances of #!/usr/bin/env python to #!/usr/bin/env python2.7 because all python2.7 stuff is installed like this: /usr/lib64/python2.7/site-packages/osmosdr.

After doing this gnuradio module was found but:

gene@go:/usr/src/PLSDR# ./PLSDR.py Traceback (most recent call last): File "./PLSDR.py", line 38, in import osmosdr File "/usr/lib64/python2.7/site-packages/osmosdr/init.py", line 26, in from osmosdr_swig import * File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 17, in _osmosdr_swig = swig_import_helper() File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 16, in swig_import_helper return importlib.import_module('_osmosdr_swig') File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named _osmosdr_swig

All of requirements are installed. Do you have any ideas how I can get this to run?

Thanks