Problem with scikit-rf and Python virtual environments

20 views
Skip to first unread message

andresmmera

unread,
May 26, 2021, 12:04:44 AMMay 26
to scikit-rf
Hello all,

I wanted to use scikit-rf in a virtual environment (venv) but I’m having trouble with it: If I take the bandpass filter example [1], it works as expected in my base (system-wide) Python installation, but it crashes in a virtual environment when the circuit.network object is called ([2], line 36).

Steps to reproduce:

1) Create a fresh virtual environment: python -m venv ./venv

2) Activate the virtual environment: source venv/bin/activate

3) Install the scikit-rf prerequisites:

pip install numpy

pip install matplotlib

pip install scikit-rf

4) Run the source ([2]). It says: “Illegal instruction” after line 35.

5) Deactivate the venv and run the source again (base installation): It works (a pdf file is saved with the filter response).

Concerning my setup, I have the same configuration both in the base installation and in the virtual environment:

matplotlib: 3.4.2

numpy: 1.20.3

scikit-rf: 0.17.0

Python 3.8.0

Operating System: Ubuntu 18.04.5 LTS
Kernel: Linux 4.15.0-20-generic
Architecture: x86-64

Am I doing something wrong?

Thank you beforehand,

Andrés Martínez

[1] https://scikit-rf.readthedocs.io/en/latest/examples/circuit/Lumped%20Element%20Circuits.html#Pass-band-filter

[2] Source. It’s [1] with minor changes Link: https://pastebin.com/heTYKWF0

Selection_007.png


Julien Hillairet

unread,
May 26, 2021, 7:28:16 AMMay 26
to scik...@googlegroups.com
Dear Andrés,

I cannot reproduce your bug on my machine (Windows or Linux): launching your script in python venv environnement works here.

Did you try reinstalling your venv? Using conda environment?

Best regards,

Julien

--
You received this message because you are subscribed to the Google Groups "scikit-rf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/cdb9cb30-0bee-42a9-a8ae-f74ae72686abn%40googlegroups.com.

andresmmera

unread,
May 26, 2021, 2:25:09 PMMay 26
to scikit-rf
Thank you Julien, that was a great help.

I tried to reinstall and upgrade the virtualenv package, but even so it still crashed. However, your suggestion to use conda worked fine here.

Again, thanks a lot!
Reply all
Reply to author
Forward
0 new messages