kit-cel / gr-lte

GNU Radio LTE receiver
GNU General Public License v3.0
394 stars 149 forks source link

Import lte failed #6

Open 8500jd opened 9 years ago

8500jd commented 9 years ago

Hello:

I'm having problems with the block 'Channel Estimator' It has a little square which says 'Import import lte' this text is in red and when i double-click it the error message says

Param -import(import): import "import lte" failed.

I don't know why it cannot import this. Can you help me with this?

Thank you.

DavidAngulo commented 9 years ago

Hi 8500jd

For the Channel Estimator and other blocks that used lte import block. The first step is download all packet of the https://github.com/kit-cel/gr-lte repository, after you do the comand (make install) in the linux console. In the /usr/local/include should appear a lte directory.

Log on in the python consol with the command (python) in a linux console and you should type (import lte), this is all.

You are ready for import lte and many others modules that you created.

lotf12 commented 8 years ago

Hello

The first step is download all packet of the https://github.com/kit-cel/gr-lte repository, after you do >the >comand (make install) in the linux console. In the /usr/local/include should appear a lte >directory. Done

Log on in the python consol with the command (python) in a linux console and you should type >>(import lte), this is all.

You mean sth like the following? or@or-VirtualBox:~/gnuradio/gr-lte/examples$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import lte Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/lte/init.py", line 45, in from lte_swig import * File "/usr/local/lib/python2.7/dist-packages/lte/lte_swig.py", line 28, in _lte_swig = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/lte/lte_swig.py", line 24, in swig_import_helper _mod = imp.load_module('_lte_swig', fp, pathname, description) ImportError: libgnuradio-lte.so: cannot open shared object file: No such file or directory

lotf12 commented 8 years ago

Thanks

Inf8 commented 8 years ago

I have the same problem. Can someone, please, help me?

SushreeMohanty commented 8 years ago

I am facing the same issue. I hope loft12 can help!

pbullian commented 8 years ago

Hi all, you just have to add the path for python to find it.

ex: export LD_LIBRARY_PATH=/usr/local/lib add it to your .bashrc or .zshrc

then try to import it. cheers,

jarodcs commented 7 years ago

Hi pbullian ... I am sorry for this question but given that I have expend lot of time trying to solve it but no solution found, here it goes:

I dont know which .bashrc we are supposed to add the path, on my machine I found these ones: /etc/bash.bashrc /etc/skel/.bashrc /etc/skel/.bashrc.original /home/blinko/.bashrc /home/blinko/.bashrc.original /root/.bashrc /usr/share/base-files/dot.bashrc /usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc /usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc /usr/share/kali-defaults/.bashrc

which of the below .bashrc I should add the text: "export LD_LIBRARY_PATH=/usr/local/lib" and why do we add that path. I just want to understand little bit more, please? Thanks in advance for any help, It will be appreciated

pbullian commented 7 years ago

you should add it to the .bashrc file of your user, if you are running it as root in /root/.bashrc, if as blinko then in /home/blinko/.bashrc. cheers,

jarodcs commented 7 years ago

hello pbullian... sorry to bother you again. I guess I have 03 final questions on this issue:

  1. the LD_LIBRARY_PATH is a environment variable, right? I wonder why you recommend the path /usr/local/lib. Is that the exactly path or what considerations should we take to find the proper path. I am asking this because in the case of kali 2016.2 it comes with gnuradio pre-installed, so maybe there is another path, what should I look for.

  2. Just to figure this out by my self, what is the concept that I should understand well to resolv this problems by my own, is it to know "environment variable", is it to understand "how gnuradio comes pre-installed (although I dont know what to look for in this case) on this kali 2016.2?

  3. Do we just paste export LD_LIBRARY_PATH=/usr/local/lib" at the end of /root/.bashrc ?

Thanks so much for your answer, I really appreciate it. Cheers

pbullian commented 7 years ago

you're right about that it can be anywhere, but if you installed this package following the cmake rules it installs it under $CMAKE_SOURCE_DIR/bin . usually, I think is /usr/local/lib.

This is gnu-radio independent, the error itself happens when python try to import the lte libray. Remember that under the hood gnu-radio is python code.

I'll correct myself and add LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to not overwrite previous custom library paths.

you can go to that folder and check if the libraries are there or not. maybe find it in your system before adding the correct path to the variable.

jarodcs commented 7 years ago

Hi pbullian, hi everyone ... Well, for reasons that I can't recall I installed gnuradio from source on a /root/Documents and also I had gnuradio already installed on my kali 2016.2 (the metapackage for SDR environment), then I uninstalled the one on /root/Documents and run again the installation of gr-lte and guess what ... yeah, I could run the installation perfectly and also the script that imports the lte blocks into gnuradio-companion ... having said that, now it is time to study this:

https://www.cel.kit.edu/download/SDR-WInnComm-Europe-2013_DemelKoslowskiJondral_Slides.pdf

Thanks to all for commentary and question&answer, I guess cooperative help really works in the matter of allowing new people to learn new stuff ... thanks again.

Cheers, best regard (I am happy) Blinko

PD: by the way, I did not need to add the LD_LIBRARY_PATH to /root/.basrhc (installation as a root user) in order to install gr-lte correctly, I just run the - /mkdir build/cd build/make/sudo make install - commands.

Keskebeu commented 6 years ago

So the installation was made without root privileges?

Keskebeu commented 6 years ago

LTE needs gruel to be build. And gruel is not available on gr3.7. So i am thinking this doesnt work with gnu3.7. I am trying to compile and have done import lte but lte_swig module is nowhere to be found to build lte receiver. I ran make under lte file and it build the library but it cannot be build.

plutonheaven commented 6 years ago

I had the same problem as Keskebeu. I installed swig with sudo apt install swig, did the installation of gr-lte again and it worked.

Keskebeu commented 6 years ago

I had swig installed but it was a change in gnu which needed needed a change in the api.h or include.h I cannot remember. Gr-lte does not do anything and is a test receiver. So I took a look at the flow for a couple of times, but it is too far from reality when it comes to sniffing staff.

On Fri, Sep 28, 2018, 5:46 AM plutonheaven notifications@github.com wrote:

I had the same problem as Keskebeu. I installed swig with sudo apt install swig, did the installation of gr-lte again and it worked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kit-cel/gr-lte/issues/6#issuecomment-425383285, or mute the thread https://github.com/notifications/unsubscribe-auth/AYP2GMBydwesoDhx7B29mO3bY5Q7A702ks5ufe_egaJpZM4F4fL6 .

CBsdr commented 5 years ago

Hy, I had same problem with import lte. I follow the pbullian indication adding the path to .bashrc ("export LD_LIBRARY_PATH=/usr/local/lib") and after that import lte command works fine in terminal with no error, but oppening lte_pbch_descrambler.grc in gnu-radio the block import lte is in red and import lte failed. Any ideea? Tanks in advance

mingli001 commented 5 years ago

hello, i meet the same question when i open some GRC modules. and after i add the environment variable as Publlian said, it is not solved. who can help me ? thank you !

CBsdr commented 5 years ago

For me works fine after I run "sudo ldconfig" in a terminal. Try...

Keskebeu commented 5 years ago

If you check on GitHub there's a resolved issue with this. You are missing a script yo be added.

I remember this from a while ago

On Tue, Apr 16, 2019, 10:14 AM CBsdr notifications@github.com wrote:

For me works fine after I run "sudo ldconfig" in a terminal. Try...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kit-cel/gr-lte/issues/6#issuecomment-483677500, or mute the thread https://github.com/notifications/unsubscribe-auth/AYP2GA25pphqZ92iYmDgC99nr3WHzWi7ks5vhdq0gaJpZM4F4fL6 .