-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only private modules found #15
Comments
The same question as yours, did you find any solutions? |
Installing with sudo (I was okay with that since I was using it in a container) seemed to work. Naturally that would be in the system python. I don't quite understand the issue though? Do some modules under the Cmake file have permission requirements? |
hi everybody,
|
I solved my problem.
I also created a conda env.
Remember that setup.py script is under the directory project.... |
Installing |
Yeah but that isn't a recommended way |
For some reason, g2opy is creating a python3.7 library. If I create a virtualenv with python3.7, I am able to use it. The generated so file is called (Also, renaming |
I install g2opy with sudo ,but it doesn't work either... |
For those having the same problem, first don't run any As discussed here, you need to build for the python version you're using. Remove the
which will create |
@minhkhang1795 @varun19299 @EnriqueSolarte After some modification you can get correction python library with correct extension name: yiakwy@yiakwy ~/WorkSpace/Github/g2opy/build master ●
cmake ..
-- Compiling on Unix
-- Found CHOLMOD and its dependencies
-- Building LGPL code as static library (affects license of the binary)
-- Compiling with OpenGL support
-- Could NOT find QGLVIEWER (missing: QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARY)
-- Compiling with GCC
-- pybind11 PYTHON_INCLUDE_DIR: /home/yiakwy/anaconda3/envs/py36/include/python3.6m
-- pybind11 PYTHON_LIBRARY: /home/yiakwy/anaconda3/envs/py36/lib/libpython3.6m.so.1.0
-- PYTHON_MODULE_PREFIX: /home/yiakwy/anaconda3/envs/py36
-- PYTHON_MODULE_EXTENSION: .cpython-36m-x86_64-linux-gnu.so
-- pybind11 v2.2.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yiakwy/WorkSpace/Github/g2opy/build
...
[ 99%] Linking CXX shared module ../../lib/g2o.cpython-36m-x86_64-linux-gnu.so
...
[100%] Built target g2o Pybind11 will generate correct library for corresponding python executables. Using sudo is prohibited because it will use system installed python which will creates global conflicts later. @minhkhang1795 @uoip I have to see scripts of External/pybind11/CMakeLists.txt only to find that they are messed up the real python package used in the project. The author wanted to use "PYTHON_BUILD_MODULE" but it actually sets to "" and moreover, setting these variables in "External/pybind11/CMakeLists.txt" in child scope makes no effects on "python/CMakeLists.txt" . These two mistakes lead to wrong configuration for python! |
Installed on
python 3.6
, anaconda. Built g2o successfully.Ran :
export PYTHON_PATH=PATH-to-g2o/g2o:$PYTHONPATH
.Able to import g2o, but only private modules found. Unable to use
g2o.SparseOptimizer
.The text was updated successfully, but these errors were encountered: