Comments (8)
Please make sure python and your dll's architectures match
from nimpy.
I'll check, but would there be any parameters to compile under different architecture? I assume it would default to same architecture as host. The machine that built it is the one attempting to import it.
from nimpy.
Please make sure python and your dll's architectures match
How do you recommend that I'd do that?
from nimpy.
Machine: x64
Python: x64
PYD: x64
from nimpy.
based on the instruction on troubleshooting-qa it also looks to me like the virtual environment isn't being read. e.g. nimpy uses default users venv
instead.
from nimpy.
Can we fund somebody to get this issue dealt with?
from nimpy.
The first step would be to teach me to reproduce it. Provide smallest possible source code of app.nim
and test.py
. Describe your python installation, version, venv, etc. What are the paths to your pyd
and main.py
files. Windows version, nim version, mingw version. Whether you tried reinstalling all of it (surprisingly this helps quite often).
from nimpy.
I solved the issue that was plaguing Windows.
import nimpy
let
builtins = pyBuiltinsModule() # specifically this line was problematic
PyNoneClass = builtins.None.getattr("__class__")
proc isNone*(py: PyObject): bool {.inline.} =
return builtins.isinstance(py, PyNoneClass).to(bool)
I tracked it down to this particular snippet and changed it to this
import nimpy
var
isInit = false
builtins: PyObject
PyNoneClass: PyObject
proc isNone*(py: PyObject): bool {.inline.} =
if not isInit:
builtins = pyBuiltinsModule()
PyNoneClass = builtins.None.getattr("__class__")
isInit = true
return builtins.isinstance(py, PyNoneClass).to(bool)
You may close the issue.
from nimpy.
Related Issues (20)
- Could not find platform dependent libraries <exec_prefix> HOT 3
- Codon
- have some trouble printing a module's version HOT 1
- keeping long lived objects alive from python HOT 2
- Import local py file HOT 2
- Nim 2.0 compatibility HOT 2
- [Bug] Using nim procedures as Python decorators is not working HOT 2
- How to unpack PPyObject (dict) to kwargs in Nim? HOT 1
- It is possible to call async function? HOT 1
- How to use python decorators HOT 1
- Error: type mismatch: nimpy.nim(223, 37) HOT 1
- undefined symbol: _PyModule_Add [Exception] HOT 3
- Nim Version 2.0 breaks (Mac) HOT 4
- Examples do not compile - `type mismatch` HOT 1
- Python Command Line Arguments Disappearing HOT 1
- How to pass Windows data types like HWND & HBRUSH
- No way of initializing type with kwargs HOT 1
- Nimpy cannot import modules with default python 3.12 install on Windows 11
- __dict__ or __slots__ implementation
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 nimpy.