discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GNURadio Windows Errors with OsmoSDR


From: Geof Nieboer
Subject: Re: [Discuss-gnuradio] GNURadio Windows Errors with OsmoSDR
Date: Tue, 25 Jun 2019 22:04:05 -0400

Hmm.  Small thing, you didn’t want to copy that system DLL to the gr-python dir, the gr-python DLL is a custom build.  But for the moment let’s not worry about that.

Let’s try this as a test... copy the pyd file to /bin folder and see if the error change.

  If not, then reopen dependency checker and drill down into the gnuradio-osmosdr and see if any of the device  driver DLLs or other reference is missing.

Past that I am puzzled.  But I’ll have a bit of time tomorrow eve to look a bit closer.

Geof

On Tue, Jun 25, 2019 at 19:37 W3AXL Patrick <address@hidden> wrote:
Alright, here we go

Following the first set of instructions:

        C:\Program Files\GNURadio-3.7\bin>python
        Python 2.7.10 (default, Jun 14 2019, 12:01:58) [MSC v.1900 64 bit (AMD64)] on win32
        Type "help", "copyright", "credits" or "license" for more information.

        >>> import subprocess
        >>> print subprocess.check_call("where python27.dll")
        C:\Program Files\GNURadio-3.7\gr-python27\DLLs\python27.dll
        C:\Program Files\GNURadio-3.7\gr-python27\python27.dll
        C:\Windows\System32\python27.dll
        C:\Program Files (x86)\Nmap\python27.dll
        0

        >>> import sys
        >>> print(sys.executable)
        C:\Program Files\GNURadio-3.7\bin\..\gr-python27\python.exe

        >>> for p in sys.path:
                print p                         (I'm assuming that's what you wanted me to do)
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages
        C:\Program Files\GNURadio-3.7\gr-python27\dlls
        C:\Program Files\GNURadio-3.7\gr-python27\libs
        C:\Program Files\GNURadio-3.7\gr-python27\lib
        C:\Program Files\GNURadio-3.7\lib\site-packages
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\pkgconfig
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0\glib
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\wx-3.0-msw
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\sphinx
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\python27.zip
        C:\Program Files\GNURadio-3.7\gr-python27\lib\plat-win
        C:\Program Files\GNURadio-3.7\gr-python27\lib\lib-tk
        C:\Program Files\GNURadio-3.7\gr-python27
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\PIL
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\pip-9.0.1-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\wheel-0.29.0-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cython-0.28.5-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\numpy-1.16.4-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cheetah-2.4.4-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\setuptools-0.0.0-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\lxml-3.6.0-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\matplotlib-2.0.0-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cycler-0.10.0-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\functools32-3.2.3.post2-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\python_dateutil-2.8.0-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\bitarray-0.8.1-py2.7-win-amd64.egg
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\setuptools-0.0.0-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\functools32-3.2.3.post2-py2.7.egg
        C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg

        >>> import numpy
        >>> import gnuradio
        >>> import osmosdr
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\__init__.py", line 26, in <module>
            from osmosdr_swig import *
          File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 17, in <module>
            _osmosdr_swig = swig_import_helper()
          File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 16, in swig_import_helper
            return importlib.import_module('_osmosdr_swig')
          File "C:\Program Files\GNURadio-3.7\gr-python27\lib\importlib\__init__.py", line 37, in import_module
            __import__(name)
        ImportError: No module named _osmosdr_swig

And you were correct, we see the System32 dll being loaded. BUT...

Now trying again after a cd to ..\gr-python27:

>>> import subprocess
>>> print subprocess.check_call("where python27.dll")
C:\Program Files\GNURadio-3.7\gr-python27\python27.dll
C:\Program Files\GNURadio-3.7\gr-python27\DLLs\python27.dll
C:\Windows\System32\python27.dll
C:\Program Files (x86)\Nmap\python27.dll
0
>>> import sys
>>> print(sys.executable)
C:\Program Files\GNURadio-3.7\gr-python27\python.exe
>>> for p in sys.path:
...   print p
...

C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages
C:\Program Files\GNURadio-3.7\gr-python27\dlls
C:\Program Files\GNURadio-3.7\gr-python27\libs
C:\Program Files\GNURadio-3.7\gr-python27\lib
C:\Program Files\GNURadio-3.7\lib\site-packages
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\pkgconfig
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0\glib
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\wx-3.0-msw
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\sphinx
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\python27.zip
C:\Program Files\GNURadio-3.7\gr-python27\lib\plat-win
C:\Program Files\GNURadio-3.7\gr-python27\lib\lib-tk
C:\Program Files\GNURadio-3.7\gr-python27
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\PIL
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\pip-9.0.1-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\wheel-0.29.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cython-0.28.5-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\numpy-1.16.4-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cheetah-2.4.4-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\setuptools-0.0.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\lxml-3.6.0-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\matplotlib-2.0.0-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cycler-0.10.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\functools32-3.2.3.post2-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\python_dateutil-2.8.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\bitarray-0.8.1-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\setuptools-0.0.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\functools32-3.2.3.post2-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg
>>> import numpy
>>> import gnuradio
>>> import osmosdr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 17, in <module>
    _osmosdr_swig = swig_import_helper()
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_osmosdr_swig')
  File "C:\Program Files\GNURadio-3.7\gr-python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _osmosdr_swig


The System32 dll is also being loaded here as well.

I don't have a run_gr_d.bat file so I can't run that test for you.

I moved the Python27.dll file from C:\Windows\System32 to my python install directory which is C:\Python27. I also copied it to the GR python locations as well.

However, the same issue persists. Here is the output of your command list after the "fix" was applied.

>>> import subprocess
>>> print subprocess.check_call("where python27.dll")
C:\Program Files\GNURadio-3.7\gr-python27\DLLs\python27.dll
C:\Program Files\GNURadio-3.7\gr-python27\python27.dll
C:\Python27\python27.dll
C:\Program Files (x86)\Nmap\python27.dll
0

>>> import sys
>>> print(sys.executable)
C:\Program Files\GNURadio-3.7\bin\..\gr-python27\python.exe

>>> for p in sys.path:
...   print p

C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages
C:\Program Files\GNURadio-3.7\gr-python27\dlls
C:\Program Files\GNURadio-3.7\gr-python27\libs
C:\Program Files\GNURadio-3.7\gr-python27\lib
C:\Program Files\GNURadio-3.7\lib\site-packages
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\pkgconfig
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0\glib
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\gtk-2.0
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\wx-3.0-msw
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\sphinx
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\python27.zip
C:\Program Files\GNURadio-3.7\gr-python27\lib\plat-win
C:\Program Files\GNURadio-3.7\gr-python27\lib\lib-tk
C:\Program Files\GNURadio-3.7\gr-python27
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\PIL
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\pip-9.0.1-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\wheel-0.29.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cython-0.28.5-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\numpy-1.16.4-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cheetah-2.4.4-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\setuptools-0.0.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\lxml-3.6.0-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\matplotlib-2.0.0-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\cycler-0.10.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\functools32-3.2.3.post2-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\python_dateutil-2.8.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\bitarray-0.8.1-py2.7-win-amd64.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\setuptools-0.0.0-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\functools32-3.2.3.post2-py2.7.egg
C:\Program Files\GNURadio-3.7\gr-python27\Lib\site-packages\lxml-3.4.4-py2.7-win.amd64.egg

>>> import numpy
>>> import gnuradio
>>> import osmosdr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 17, in <module>
    _osmosdr_swig = swig_import_helper()
  File "C:\Program Files\GNURadio-3.7\lib\site-packages\osmosdr\osmosdr_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_osmosdr_swig')
  File "C:\Program Files\GNURadio-3.7\gr-python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _osmosdr_swig

So evidently even though the dll is gone from System32 the issue still persists.

Thoughts? Again I appreciate your help.

Patrick

-----Original Message-----
From: Geof Nieboer <address@hidden>
Sent: Tuesday, June 25, 2019 9:06 AM
To: W3AXL Patrick <address@hidden>
Cc: address@hidden
Subject: Re: [Discuss-gnuradio] GNURadio Windows Errors with OsmoSDR

OK, I think a clue here is that a python dll is installed in System32.
Windows will always check System32 regardless of the PATH, so something there might be causing some misdirection.

Try this... run the "run_gr.bat" file and once in, run python by simply entering "python"

Then enter;
import subprocess
print subprocess.check_call("where python27.dll") import sys
print(sys.executable)
for p in sys.path:
import numpy
import gnuradio
import osmosdr

This will get us some basic path info and we can see where it breaks.
THEN repeat, but before running the python command enter "cd ..\gr-python27" and see if the results are different.
Finally, repeat the above but using the run_gr_d.bat instead.  That runs the debug version of python, and it's less likely you have a debug version installed on your machine, so if _d works that's just further confirmation.

My suspicion is that the above will show that that the DLL from
System32 is being loaded in the first case, but not in the others.  If so, then the solution is to remove python27.dll from System32 (which belongs to a different python installation) and move it to wherever you have a 64-bit install of python27 (since it at least appears to be a 64 bit Dll) in the same folder as python.exe.  If you have more than, then copy it to each one that doesn't have one of it's own.

If none of this worked, please send screen shots back.

I don't believe many Python distros are still installing to System32 for exactly this reason.

>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]