Git Product home page Git Product logo

Comments (7)

adankvitschal avatar adankvitschal commented on August 16, 2024

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.

ignamv avatar ignamv commented on August 16, 2024

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.

adankvitschal avatar adankvitschal commented on August 16, 2024

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.

endolith avatar endolith commented on August 16, 2024

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.

ignamv avatar ignamv commented on August 16, 2024

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.

endolith avatar endolith commented on August 16, 2024

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.

ignamv avatar ignamv commented on August 16, 2024

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)

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.