Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python error, Can't import from stdlib error

Tags:

python

import

I'm getting at error when trying to import from qtgui site-package. Here's an excerp from the code that's having and error.

from gnuradio import qtgui

on of the files in sitepackage qtgui is textparser which contains the statement:

from stdlib import read_file

That's where the error is thrown.

Following the traceback the problem is that on of the files in qtgui, called textparser.py tries to import read_file from stdlib. Here is the traceback of the offending line.

    File "/usr/lib/python2.7/site-packages/qtgui/textparser.py", line 2, in <module>
    from stdlib import read_file
ImportError: No module named stdlib

The line "from stdlib import read_file" looks correct except i cant find any information about a package called stdlib for python. However stdlib sounds like the c library. I'm new to Python, is that the proper way to import a c library?
So am I missing a python package or module, or a c library? By the way I'm using python2.7, and Centos 7. I can't use Python 3 because I'm using GNUradio which i don't think supports Python 3. Thanks in advance.

like image 911
Frank Avatar asked Mar 14 '26 03:03

Frank


1 Answers

there is no such library in stdlib in python there is a library called stdlib_list what you gonna supposed to do in your code put a code sample

like image 167
Harsh Bhut Avatar answered Mar 16 '26 18:03

Harsh Bhut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!