Comments (6)
".so"(on linux) and ".pyd"(on windows) files are basically the same. Have you tried import NanoTest
?
from nanobind.
@a603032070 Yes I tried, no module found.
I changed binding name to my_ext
to be inline with the example. I checked on my system I have python 3.11.
I also tried to give a path directly to the .so file:
import sys
sys.path.append('/home/petras/brg/2_code/ShapeOp/build/')
import my_ext
Still the same error.
I removed any 3rd party libraries and just left nano, could you check my repository:
https://github.com/petrasvestartas/ShapeOp
from nanobind.
@a603032070 Yes I tried, no module found. I changed binding name to
my_ext
to be inline with the example. I checked on my system I have python 3.11.I also tried to give a path directly to the .so file:
import sys sys.path.append('/home/petras/brg/2_code/ShapeOp/build/') import my_extStill the same error.
I removed any 3rd party libraries and just left nano, could you check my repository: https://github.com/petrasvestartas/ShapeOp
I've checked your repo. It works well. Maybe something wrong about the path(or permissions)?
from nanobind.
The issue is in python version. In my base environment with python 3.11 it works.
But with my conda environment where python is 3.9 it does not.
How you can specify in CMakelists which python version the library is built for?
from nanobind.
I don't really know. Maybe it's about this line in Cmakelists.
find_package(Python 3.9 COMPONENTS Interpreter Development.Module REQUIRED)
https://cmake.org/cmake/help/latest/module/FindPython.html
from nanobind.
ExternalProject_Add
is not a supported way of dealing with the nanobind dependency, I don't use it and cannot provide support for it.
I also suspect you are working partly on windows and on Linux (WSL?), hence the confusion about .pyd
and .so
files which are for different operating systems.
Anyways, these are all not bugs bug issues with your setup. Please don't open tickets here unless you are certain to have found a bug in nanobind.
from nanobind.
Related Issues (20)
- [BUG]: Docstring/signature of bound function not rendering properly HOT 12
- [BUG]: The stride of an ndarray can be wrong for numpy views HOT 5
- [BUG]: weirdness with "big" uint ndarray HOT 3
- [BUG]: The typename defined in nb::sig found partly stripped in the generated stub HOT 5
- [BUG]: nb::arg("name").sig("sig") doesn't work HOT 3
- [BUG]: 'wrapper' type casters can crash by raising exceptions through noexcept HOT 6
- [OTHER]: ndarray <-> Eigen type mismatch error would be easier to interpret if supplied argument types included the provided `shape` HOT 3
- [BUG]: object won't be released until exit python HOT 5
- [BUG]: inst_dealloc() Function Execution Is Slow HOT 3
- [BUG]: error "nanobind requires a newer PyPy version (>= 7.3.10)" HOT 2
- [BUG]: importing my_ext fails with "ModuleNotFoundError: No module named 'my_ext'" on Windows HOT 3
- [BUG]: Classes Using MatrixXd Attributes and in Initializer List Have Type Errors HOT 1
- [Request]: stl vector.reserve(...) method HOT 1
- nanobind enum design flawed (mutation can break things globally) HOT 6
- [OTHER]: Stub generation + editable install? HOT 2
- [BUG]: cannot pass `1d matrix` (numpy shape (1,1)) across nanobind as `Eigen::Matrix<double,-1,-1>` HOT 5
- [BUG]: Tests fail: E ModuleNotFoundError: No module named 'test_ndarray_ext' HOT 2
- [BUG]: instance relinquished to unique_ptr can be reinitialized from Python, leading to state confusion HOT 3
- [Feature request]: pdm backend support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanobind.