Giter VIP home page Giter VIP logo

Comments (8)

soulslicer avatar soulslicer commented on July 1, 2024 1
cmake -DPYTHON_EXECUTABLE  /usr/bin/python3.5 -DPYTHON_LIBRARY /usr/lib/x86_64-linux-gnu/libpython3.5m.so ..

from kitti_depthmap.

NagabhushanSN95 avatar NagabhushanSN95 commented on July 1, 2024 1

Thanks! That worked. I had to put = as in -DPYTHON_EXECUTABLE=/usr/bin/python3.5 and it worked.

from kitti_depthmap.

soulslicer avatar soulslicer commented on July 1, 2024

you are suppose to compile it

from kitti_depthmap.

NagabhushanSN95 avatar NagabhushanSN95 commented on July 1, 2024

Oh! Can you please guide me on how to compile it? I'm very new to using c++ with python and I have no experience in c or c++

from kitti_depthmap.

soulslicer avatar soulslicer commented on July 1, 2024

you can find it in readme

from kitti_depthmap.

NagabhushanSN95 avatar NagabhushanSN95 commented on July 1, 2024

You mean this?

mkdir build;
cd build;
cmake ..;
make
python3 testing.py

I've already done this. Still I'm getting the error

(soulslicer) $ export OpenCV_DIR=.../OpenCV
(soulslicer) $ cmake ..;
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
-- Found OpenCV: .../OpenCV (found version "3.4.1") 
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: .../004_soulslicer/src/build
(soulslicer) $ make
Scanning dependencies of target utils_lib
[ 50%] Building CXX object CMakeFiles/utils_lib.dir/python/utils_lib.cpp.o
[100%] Linking CXX shared module utils_lib.cpython-36m-x86_64-linux-gnu.so
[100%] Built target utils_lib

(soulslicer) $ python3 testing.py
Traceback (most recent call last):
  File "testing.py", line 1, in <module>
    import utils_lib as pyutils
ModuleNotFoundError: No module named 'utils_lib'
(soulslicer) $

from kitti_depthmap.

NagabhushanSN95 avatar NagabhushanSN95 commented on July 1, 2024

These are the contents of the build directory and I'm running testing.py within build directory

CMakeCache.txt  CMakeFiles  cmake_install.cmake  __init__.py  Makefile  pybind11  testing.py  utils_lib.cpython-36m-x86_64-linux-gnu.so

from kitti_depthmap.

NagabhushanSN95 avatar NagabhushanSN95 commented on July 1, 2024

Creating a symlink as follows helped

ln -s utils_lib.cpython-36m-x86_64-linux-gnu.so utils_lib.so

However, it is compiled for python3.6, which I guess it took from my system python. However, my conda environment is python 3.8. So, I'm getting the following error

Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.8.3 | packaged by conda-forge | (default, Jun  1 2020, 17:43:00)

Can you help me to compile the file for python 3.8? Basically I need to tell cmake/make to use the python in the conda environment and not system python

from kitti_depthmap.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.