Giter Club home page Giter Club logo

Comments (4)

embyte0 avatar embyte0 commented on July 2, 2024

Thanks @marcelrv for reporting these fixes. I will be happy to approve a pull request, if you provide one ;-)

from ais.

Mictronics avatar Mictronics commented on July 2, 2024

@marcelrv
I still get the error ImportError: No module named _AISTX_swig even while following your fix.
swig is installed.

~/ais$ ./AIVDM_Encoder.py --type=1 --mmsi=247320162 --lat='48.0' --long='10.0' --speed=50 --course=50 --vtype=30 | xargs -IX ./AiS_TX.py --payload=X --channel=A
linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown

Traceback (most recent call last):
  File "./AiS_TX.py", line 35, in <module>
    import AISTX
  File "/usr/local/lib/python2.7/dist-packages/AISTX/__init__.py", line 45, in <module>
    from AISTX_swig import *
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 17, in <module>
    _AISTX_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_AISTX_swig')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _AISTX_swig
~/ais$ 

Host: linuxmint Kernel: 5.4.0-40-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 
Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia 
base: Ubuntu 18.04 bionic 

Any help appreciated.

from ais.

Mictronics avatar Mictronics commented on July 2, 2024

The entire build and installation log:

lupus:~/ais/gr-aistx/build$ cmake ../ -Wno-dev -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'gnuradio-runtime'
--   Found gnuradio-runtime, version 3.7.11
-- Found GNURADIO_RUNTIME: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so  
-- Checking for module 'cppunit'
--   Found cppunit, version 1.14.0
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl  
-- Found SWIG: /usr/bin/swig3.0 (found version "3.0.12") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.17") 
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components:  doxygen dot 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lupus/ais/gr-aistx/build

lupus:~/ais/gr-aistx/build$ make
Scanning dependencies of target gnuradio-AISTX
[  4%] Building CXX object lib/CMakeFiles/gnuradio-AISTX.dir/nrz_to_nrzi_impl.cc.o
[  8%] Building CXX object lib/CMakeFiles/gnuradio-AISTX.dir/Build_Frame_impl.cc.o
[ 12%] Building CXX object lib/CMakeFiles/gnuradio-AISTX.dir/DebugME_impl.cc.o
[ 16%] Linking CXX shared library libgnuradio-AISTX.so
[ 16%] Built target gnuradio-AISTX
Scanning dependencies of target test-AISTX
[ 20%] Building CXX object lib/CMakeFiles/test-AISTX.dir/test_AISTX.cc.o
[ 24%] Building CXX object lib/CMakeFiles/test-AISTX.dir/qa_AISTX.cc.o
[ 28%] Linking CXX executable test-AISTX
[ 28%] Built target test-AISTX
Scanning dependencies of target _AISTX_swig_swig_tag
[ 32%] Building CXX object swig/CMakeFiles/_AISTX_swig_swig_tag.dir/_AISTX_swig_swig_tag.cpp.o
[ 36%] Linking CXX executable _AISTX_swig_swig_tag
[ 36%] Built target _AISTX_swig_swig_tag
Scanning dependencies of target _AISTX_swig_doc_tag
[ 40%] Building CXX object swig/CMakeFiles/_AISTX_swig_doc_tag.dir/_AISTX_swig_doc_tag.cpp.o
[ 44%] Linking CXX executable _AISTX_swig_doc_tag
[ 44%] Built target _AISTX_swig_doc_tag
Scanning dependencies of target pygen_swig_a689b
[ 48%] Generating doxygen xml for AISTX_swig_doc docs
[ 52%] Generating AISTX_swig_doc.i
[ 56%] Generating AISTX_swig.tag
[ 60%] Swig source
[ 64%] Generating AISTX_swig.pyc
[ 68%] Generating AISTX_swig.pyo
[ 68%] Built target pygen_swig_a689b
Scanning dependencies of target _AISTX_swig
[ 72%] Building CXX object swig/CMakeFiles/_AISTX_swig.dir/AISTX_swigPYTHON_wrap.cxx.o
[ 76%] Linking CXX shared module _AISTX_swig.so
[ 92%] Built target _AISTX_swig
Scanning dependencies of target pygen_python_31354
[ 96%] Generating __init__.pyc
[100%] Generating __init__.pyo
[100%] Built target pygen_python_31354
Scanning dependencies of target pygen_apps_9a6dd
[100%] Built target pygen_apps_9a6dd

lupus:~/ais/gr-aistx/build$ sudo make install
[ 16%] Built target gnuradio-AISTX
[ 28%] Built target test-AISTX
[ 36%] Built target _AISTX_swig_swig_tag
[ 44%] Built target _AISTX_swig_doc_tag
[ 68%] Built target pygen_swig_a689b
[ 92%] Built target _AISTX_swig
[100%] Built target pygen_python_31354
[100%] Built target pygen_apps_9a6dd
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/AISTX/api.h
-- Installing: /usr/local/include/AISTX/nrz_to_nrzi.h
-- Installing: /usr/local/include/AISTX/Build_Frame.h
-- Installing: /usr/local/include/AISTX/DebugME.h
-- Installing: /usr/local/lib/libgnuradio-AISTX.so
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/_AISTX_swig.so
-- Set runtime path of "/usr/local/lib/python2.7/dist-packages/AISTX/_AISTX_swig.so" to ""
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.pyo
-- Installing: /usr/local/include/AISTX/AISTX/swig/AISTX_swig.i
-- Installing: /usr/local/include/AISTX/AISTX/swig/AISTX_swig_doc.i
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/__init__.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/AISTX/__init__.pyo
-- Installing: /usr/local/share/gnuradio/grc/blocks/AISTX_nrz_to_nrzi.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/AISTX_Build_Frame.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/AISTX_DebugME.xml

lupus:~/ais$ ./AiS_TX.py 
linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown

Traceback (most recent call last):
  File "./AiS_TX.py", line 35, in <module>
    import AISTX
  File "/usr/local/lib/python2.7/dist-packages/AISTX/__init__.py", line 45, in <module>
    from AISTX_swig import *
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 17, in <module>
    _AISTX_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_AISTX_swig')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _AISTX_swig

What puzzles me is this -- Set runtime path of "/usr/local/lib/python2.7/dist-packages/AISTX/_AISTX_swig.so" to "". Is that correct?

from ais.

Mictronics avatar Mictronics commented on July 2, 2024

Solved with export LD_LIBRARY_PATH=/usr/local/lib.

from ais.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.