Getting ready for summer python immersion
I installed all needed libraries using pip
pip install numpy
pip install matplotlib
pip install scipy
pip install nidaqmx
pip install mcculw
pip install pyvisaThese are now installed in
Location: /opt/anaconda3/lib/python3.12/site-packages
But I now would like to use IDLE to write my code (that is what the workshop organizer uses.) He says:
I haven't used JupiterLab enough to know all of its features, so I'll just describe what's in the book and you can tell me if it's possible in JupiterLab. Throughout the book, the programs are developed in a modular fashion where, say, a group of functions is placed in a self-written module (that is, a separate Python file with extension .py) and then that module is imported into a main program, where the functions are used. Is it possible to do that with JupiterLab?
In the book, I use IDLE, which is part of what is installed when you download Python. IDLE can be used to create and then run Python programs.
You're right about the downloads from NI and MCC being Windows only. Unfortunately, it's pretty common that the software drivers provided by equipment manufacturers for DAQ hardware aren't available for the macOS (that's been quite a pain for me at Reed because Steve Jobs went to school here and the college has been very Mac-centric). Anyway, Python itself is portable across platforms so you can write and test your programs on a Mac and then transfer them to a Windows machine and they will run fine. I did that quite a bit when I was writing the book and only found that the GUIs looked slightly different on the two platforms.
So I downloaded python version 3.13.3 and now that is in my applications directory and I can run IDLE from there.
Now the command:
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -V
Gives output
Python 3.13.3
Using pip to install all of the libraries:
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install numpy
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install matplotlib
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install scipy
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install nidaqmx
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install mcculw
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m pip install pyvisa
No comments:
Post a Comment