Git Product home page Git Product logo

pybind-example's Introduction

pybind-example

simple example of using pybind and eigen

Памятка для себя о том, как собрать и запустить этот пример в anaconda3 на машине с Windows 10/11 и компилятором MinGW. 0. Компилятор MinGW установлен, путь к его директории запуска прописан в переменную окружения Path.

  1. Запустить командную строку ananconda3.
  2. pip install pybind11
  3. cd pybind-example
  4. mkdir build && cd build
  5. Создать batch файл run.bat с содержимым: cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_PREFIX_PATH=X:/.../anaconda3/Lib/site-packages/pybind11 -DEigen3_DIR=X:/.../anaconda3/Lib/site-packages/eigen/build ..
  6. Перейти в директорию X:/.../anaconda3/Lib/site-packages/ и склонировать туда исходники eigen3: git clone https://gitlab.com/libeigen/eigen.git
  7. Создать внутри eigen поддиректорию build : mkdir X:/.../anaconda3/Lib/site-packages/eigen/build
  8. Создать внутри build batch файл run.bat с содержимым: cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..
  9. Запустить этот run.bat.
  10. Затем mingw32-make.exe. В ....eigen/build будет доформировано все, что нужно.
  11. Снова вернуться в директорию pybind-example/build и запустить там тот run.bat.
  12. mingw32-make.exe
  13. cd ..
  14. Запустить пример: python test.py
  15. Библиотеки C++-runtime должны быть в директории с собранной библиотекой в build (если система их не видит самостоятельно).

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.