If you have a version of Python installed with Homebrew, try unlinking it.
brew unlink python
/usr/local/bin/xattr uses the version of Python 3 suggested to it by env. Brew overrides this, but does not include the xattr library, causing this issue.
You must include the python you use into the xcode build scheme after that you can run python scripts in xcode.
here is the detailed explanation on how to do that.
But your only goal is to run the script and view the plot, running the code in terminal is the better option to do that.
Outside the App Store you can use any ad-hoc or self signed certificate, but I recommend using an official developer account Developer ID for maxim ease of use.
Letting Apple notarize your app by signing your developer ID certificate, helps people trust your app.
Notarization is free, developer signing certificates are provided in an annual paid or free ...
I have successfully installed Maxima-Jupyter on macOS using Homebrew.
brew uninstall maxima # (if you have already installed)
brew install sbcl gpg zmq gnuplot
brew edit maxima
Edit Formula/maxima.rb. Comment out "--enable-sbcl-exec",
Well, it sure seems the difference is caused by different methods of installing Python. If your systems are identical then its caused by Python itself. You could try installing python via homebrew on your new machine and see if the behavior changes. You should run python in a virtual environment. If you do that you can have multiple versions of python3 on ...
Another option is to use the Anaconda distribution of Python3. This along with Anaconda will provide you with Python 3.8. Python should be run in virtual environments and these are simple to manage in Anaconda. Anaconda comes with several data analysis tools if you are interested in that.
You can easily install any new version of python you wish; and you cannot remove the system python.
macOS traditionally comes with python2. You can install a newer version of python2, and choose whether you use the system python or the newer version by how you call it, or by the first line of your script. Using /usr/bin/python will use the system python, ...
You can code sign your distribution manually using the codesign tool. Apple's Code Signing Guide includes a section on manually signing code:
Signing Your Code Manually
… In the unusual case that you sign your code manually, or to interrogate an app for details about its signature, you use the codesign command line tool directly. See the codesign man page ...