# ImportError: cannot import name myownhowto

**URL:** <https://www.ruby-forum.com/t/importerror-cannot-import-name-myownhowto/189534>\
**Category:** GNU Radio\
**Created:** [June 2, 2010, 4:37pm UTC](https://www.ruby-forum.com/t/importerror-cannot-import-name-myownhowto/189534 "2010-06-02T16:37:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zohair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7cd45c/32.png) [@zohair](https://www.ruby-forum.com/u/zohair)\
**Post date:** [June 2, 2010, 4:37pm UTC](https://www.ruby-forum.com/t/importerror-cannot-import-name-myownhowto/189534/1 "2010-06-02T16:37:39Z")

</div>

Hello everyone,

Incorporating a MATLAB \*.so library, I have created a block using the  
howto\_square template. I also followed the discussion in the  
[http://old.nabble.com/Need-help-with-gr-how-to-create-a-signal-processing-block-template-td28646216.html](http://old.nabble.com/Need-help-with-gr-how-to-create-a-signal-processing-block-template-td28646216.html)  
thread here . The code compiles very nicely but when I run it in GRC I  
receive this message:

Traceback (most recent call last):  
File “/home/zohair/Desktop/top\_block.py”, line 8, in   
from gnuradio import myownhowto  
ImportError: cannot import name myownhowto

I coped my matlab library (libmyfirstblock.so) to /usr/lib and in my  
/top\_dir/lib/makefile.am, I have added these line as instructed in the  
link  
above:

AM\_CPPFLAGS+=-I$(MATLAB\_ROOT)/extern/include

libgnuradio\_myownhowto \_la\_LIBADD =   
$(GNURADIO\_CORE\_LA)  
-L/usr/lib -lmyfirstblock

libgnuradio\_myownhowto \_la\_LDFLAGS =   
$(NO\_UNDEFINED)  
-rpath  
/usr/lib:-L$(MATLAB\_ROOT)/bin/glnx86:-I$(MATLAB\_ROOT)/extern/include:$(MATLAB\_ROOT)/runtime/glnx86:$(MATLAB\_ROOT)/sys/os/glnx86

in my .bashrc file:  
export MATLAB\_ROOT=“/home/zohair/MATLAB”  
export MY\_LIB\_ROOT=“/home/zohair/MATLAB/work”  
export LD\_LIBRARY\_PATH=“$MATLAB\_ROOT/extern/include”  
export PATH=“$PATH:$LD\_LIBRARY\_PATH”

Any help with this error, please?

Cheers

## Zohair

View this message in context:  
[http://old.nabble.com/ImportError%3A-cannot-import-name-myownhowto-tp28755411p28755411.html](http://old.nabble.com/ImportError%3A-cannot-import-name-myownhowto-tp28755411p28755411.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![zohair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7cd45c/32.png) [@zohair](https://www.ruby-forum.com/u/zohair)\
**Post date:** [June 2, 2010, 5:35pm UTC](https://www.ruby-forum.com/t/importerror-cannot-import-name-myownhowto/189534/2 "2010-06-02T17:35:01Z")

</div>

When I type:  
~$ sudo ldconfig

I receive:  
/sbin/ldconfig.real: /usr/local/lib/libgnuradio-myownhowto.so.0 is not  
a  
symbolic link

Zohair wrote:

> File “/home/zohair/Desktop/top\_block.py”, line 8, in   
> $(GNURADIO\_CORE\_LA)  
> export MY\_LIB\_ROOT=“/home/zohair/MATLAB/work”  
> export LD\_LIBRARY\_PATH=“$MATLAB\_ROOT/extern/include”  
> export PATH=“$PATH:$LD\_LIBRARY\_PATH”
> 
> Any help with this error, please?
> 
> Cheers
> 
> Zohair

–  
View this message in context:  
[http://old.nabble.com/ImportError%3A-cannot-import-name-myownhowto-tp28755411p28756180.html](http://old.nabble.com/ImportError%3A-cannot-import-name-myownhowto-tp28755411p28756180.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
