PySpice icon indicating copy to clipboard operation
PySpice copied to clipboard

Documentation isn't clear on how to install ngspice and PySpice separately.

Open Nick-Hemenway opened this issue 1 year ago • 1 comments

I installed PySpice using:

pip install PySpice

I tried running pyspice-post-installation --install-ngspice-dll but it failed due to an SSL error. So I installed ngspice from the main website.

I then extract the files from the zip folder and place it in my appdata folder. I modify the system Path variable to point to the ngspice executable. I would think this would be enough for PySpice to be able to locate ngspice?

When I run: pyspice-post-installation --check-install I still get the following:

OSError: cannot load library 'C:\Users\nhemenway\.virtualenvs\spice_sim\Lib\site-packages\PySpice\Spice\NgSpice\Spice64_dll\dll-vs\ngspice.dll': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\\Users\\nhemenway\\.virtualenvs\\spice_sim\\Lib\\site-packages\\PySpice\\Spice\\NgSpice\\Spice64_dll\\dll-vs\\ngspice.dll'

It appears that it's looking for ngspice inside the PySpice source code instead of where Path points it. I would like to try out PySpice but I'm not sure how to get it working since the documentation isn't clear on how to install without using either conda or the pyspice-post-installation utility (which isn't working). How do I fix this?

Nick-Hemenway avatar Oct 30 '24 18:10 Nick-Hemenway

I can recommend you try this fork of pyspice https://github.com/Kreijstal/PySpice/tree/patch-2 with msys2 ngspice, I did it that way and worked beautifully image

Kreijstal avatar Nov 23 '24 17:11 Kreijstal