Setting up on MAcOSX for development. #620
Replies: 5 comments 5 replies
-
When you run The location where the files are installed depends on the operating system and the Python installation. Generally, the packages are installed in the site-packages directory of the Python installation. On Linux and macOS systems, the site-packages directory is typically located in /usr/local/lib/pythonX.X/site-packages/, where X.X represents the Python version number. This command reads the setup.py file in the current directory and installs the package based on the information provided in that file. The setup.py file typically includes information such as the package name, version, author, dependencies, and other metadata. The breakpoint does not work, because it does not run the code that you have open in the editor, it runs code in |
Beta Was this translation helpful? Give feedback.
-
On OSX you better not lean on the shebang to pick the proper python. Even more so on the ARM machines. You may end up it installing you x86 .so to you. |
Beta Was this translation helpful? Give feedback.
-
My experience (on a Linux system) is that you do not need a lot of installation, I did a simple clone of the GH repo and started the saver by This procedure is fully ok for me doing development on nanovna-saver. Maybe off-topic? |
Beta Was this translation helpful? Give feedback.
-
By the way, I have other self contained small python project on same machine and using same version of python and IDI and everything works. So it must be something specific here :) I will keep looking |
Beta Was this translation helpful? Give feedback.
-
Ok, I was able to figure it out. Here is what I did and the last step was what I needed to adjust. I am running python version From Terminal:
Here is the content of launch.json {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: main (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/nanovna-saver.py",
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}",
//"args": [""] // ["-f", "file"]
}
} So the issue was that Visual Studio Code when it created For others. Here is my (nanovna-saver) ➜ pip list
Package Version
----------------- ------------------------------------
Cython 0.29.33
NanoVNASaver 0.6.0.post1.dev3+g52cdac4f.d20230316
numpy 1.24.2
packaging 23.0
pip 23.0.1
PyQt6 6.4.2
PyQt6-Qt6 6.4.2
PyQt6-sip 13.4.1
pyserial 3.5
scipy 1.10.1
setuptools 67.6.0
setuptools-scm 7.1.0
typing_extensions 4.5.0
wheel 0.40.0 So cool, now I can debug. If there are any arey other gothas or watch out from other developers, please let me know. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to set up my machine to help fix some bugs that I do encounter on MacOSX myself. I think I got most of the setup done. I can start the debugger and hit the first break point at
nanovna-server.py
.The issue is that when I try to step-in, the application just continues "over" and I see the main screen right away. I did open
src/__main__.py
and set up a breakpoint on the first line but it never stops on it.Can someone help me figure out what am I missing or doing wrong?
Here is a little about my setup/config:
MacOSX Venture running on M1
Python 3.11.2 installed with homebrew
IDE is Visual Studio Code
virtual env created and sourced in
Here is list of pip packages installed
Here is a .vscode/launch.json contents
A side note: Reading CONTRIBUTING.rst I did followed information but found some issues/inconsistency.
** You should run:: ** section states:
but I had to run this command from setup.py in other to make it work
Also, I had to manually run from the project root directory. This was not mentioned.
Please note all pip commands were executed after sourcing venv
Beta Was this translation helpful? Give feedback.
All reactions