For future reference, since there is not much help for the ViennaRNA-2.4.10 package:
I ran into this error after installing the package with the python3 interface. I found a fix for me:
Go to the directory: /usr/local/lib/python3.5/site-packages you should find the directory /RNA which should contain the __init__.py file that tells python to consider this directory for importing a library.
You should also find a .so file, rename that file to be _RNA.sosee: http://www.swig.org/Doc1.3/Python.html#Python_nn9
A common error received by first-time users is the following:
>>> import example
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "example.py", line 2, in ?
import _example
ImportError: No module named _example
If you get this message, it means that you either forgot to compile the wrapper code into an extension module or you didn't give the extension module the right name. Make sure that you compiled the wrappers into a module called _example.so. And don't forget the leading underscore (_).
This solved my import error.
Hope this helps
The use of
--prefix=/usr/local/ViennaRNAis non-standard. Simply using--prefix=/usr/local(which is also the default) would have done the trick since/usr/local/lib/python... should already be in yourPYTHON_PATH