Getting skippedcaipi_sampling.py to work #9
StevenWhitaker
started this conversation in
General
Replies: 1 comment
-
I'll note here that I tried
and got
To get around this, I ran
and then the test worked. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I haven't used Python on my computer before, so I had to set it up basically from scratch in order to use skippedcaipi_sampling.py, specifically when calling Python from MATLAB using MATLAB's
system
command. There were some snags along the way, so I figured I would document my experience in case others experience the same thing.System Information
I run Kubuntu 20.04 (so what I write here will largely be applicable to any Debian-based Linux distribution, particularly Ubuntu and its derivatives). It comes with Python 3.8.10 by default, but I had never used it.
Installing Necessary Packages
At first, I ran into error messages about missing modules, such as
I installed the proper packages with
After this, I got the following error:
After digging around StackOverflow, I determined I needed to run
Upgrading Python
But even that wasn't enough, so I decided to try the most recent Python version (3.10.7). I had to install it from source, but it was relatively straightforward. Fortunately, running skippedcaipi_sampling.py from MATLAB worked after this (after installing numpy, matplotlib, and scipy again on the new Python version).
Conclusion
Getting skippedcaipi_sampling.py to work when called using MATLAB's
system
command was not as straightforward as I was hoping. Fortunately, the internet is full of knowledge, and I was able to get it working. Hopefully my experience can be helpful to someone else.Beta Was this translation helpful? Give feedback.
All reactions