uoip / g2opy

Python binding of SLAM graph optimization framework g2o
669 stars 177 forks source link

Successfully build but can't import package #12

Closed clmnin closed 5 years ago

clmnin commented 5 years ago

I followed the instructions and was successful in building the project. And even successfully copied the shared library into the python site-packages.

But when I try

$ python
import g2o
Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
ImportError: No module named 'g2o'

How can I show python the compiled cpython module?

clmnin commented 5 years ago

This was solved here SO question

It was a misunderstanding from my side. I hadn't worked with locally build packages, so just a hiccup in adding the path.

You can add a path by either modifying the PYTHONPATH or adding sys.path.append("/path/to/the/package/g2opy")