Comments (7)
Same problem, I have installed ngspice 37 using chocolatey and there is no dll anywhere in the program files. I also downloaded an auxiliary zip package named ngspice-37_dll_64 from the ngspice webpage, but I am currently getting an error if I try to import directly in command line (currently I know nothing about python, just getting started):
import ngspyce
Traceback (most recent call last):
File "", line 1, in
File "C:\Python310\lib\site-packages\ngspyce-0.1-py3.10.egg\ngspyce_init_.py", line 2, in
from .ngspyce import *
File "C:\Python310\lib\site-packages\ngspyce-0.1-py3.10.egg\ngspyce\ngspyce.py", line 3, in
from .sharedspice import *
File "C:\Python310\lib\site-packages\ngspyce-0.1-py3.10.egg\ngspyce\sharedspice.py", line 37, in
spice = CDLL('ngspice')
File "C:\Python310\lib\ctypes_init_.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'ngspice' (or one of its dependencies). Try using the full path with constructor syntax.
I decided to try WSL/ubuntu on windows before giving this a second try.
from ngspyce.
I don't have a Windows machine at hand, but have you tried adding the directory where the DLL is to sys.path
?
sys.path.append('C:/path/to/DLL/directory')
from ngspyce.
Sorry for the long time to answer. I tried that without success using some different folder combinations, the packages I found even had different DLL versions for vscode and mingw compiled versions, and it seems there exists a sepparate/obscure distribution for the windows versions of the shared versions of ngspice that is not the same as the executable version. Since I am now working on a Docker container without any problem, I will try this later.
from ngspyce.
Is there any legal reason why the .dll can't be included in this software directly? I think that would simplify everything for everyone, and you don't have to worry about the interface becoming incompatible, etc.
from ngspyce.
In principle we could do that, but it feels dirty to package ngspice
:
- users are going to be running our outdated
ngspice
unless we keep up with their releases. - binaries can hide all kinds of stuff. I wouldn't want to be spreading malware because someone's PC was compromised and compiled bad binaries.
If the ngspice
team are already packaging the DLL, I think we should just make it easy to find this package and point Python to it. Unfortunately I can't try stuff myself since I'm only running Linux, but feel free to discuss this with the other Windows users.
from ngspyce.
users are going to be running our outdated ngspice unless we keep up with their releases.
But isn't that good? The version of ngspice should match the version of ngspyce, so that they are guaranteed to be compatible with each other?
binaries can hide all kinds of stuff. I wouldn't want to be spreading malware because someone's PC was compromised and compiled bad binaries.
It's already getting those binaries from sourceforge and using them, what's the difference?
from ngspyce.
It's now possible to get ngspice binaries using anaconda:
conda install -c conda-forge ngspice
This installs both the executable and the shared library.
from ngspyce.
Related Issues (9)
- Add a doc for ngspyce ? HOT 2
- Memory increases forever HOT 7
- unable to find libngspice HOT 3
- power dissipation and storage inside the resistor and inductor HOT 2
- Issue with alterparams HOT 1
- Error when running example/quad.py
- ngspyce using ngspice.dll under windows ? HOT 3
- libngspice.so: cannot open shared object file: No such file or directory HOT 10
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 ngspyce.