the-anylogic-company / AnyLogic-Pypeline

A custom AnyLogic library for running Python inside an AnyLogic model (Java)
https://github.com/the-anylogic-company/AnyLogic-Pypeline/wiki
MIT License
107 stars 27 forks source link

Issues with Python on Mac #30

Closed bongoerin closed 6 months ago

bongoerin commented 2 years ago

In the "Python Executable Path" part of the Pypeline module, I added where my Python exe file is on my mac ("usr\bin\python3") and I'm getting this error when I try to run it: "Error during model startup:

root.pyCommunicator:

Problem with setting up Python Subprocess

Caused by: Python process failed to properly start. This process needs to be started by a 'live' agent. Error message from process: 'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun"

I tried using just "usr\bin" as well, but that didn't work either. It did run when I used this path "/Users/Erin/Applications/Python 3.9/bin" however that points to an python Alias file and not the exe. And it's still not working because it can't find the python packages needed for my project (even though they are installed on my computer)

t-wolfeadam commented 2 years ago

Thanks for reporting this! It may have to do with my method of calling system commands.

You may be able to get it resolved by installing the Xcode Command line tools package (as described here) - note that this does not install xcode, just a tools package.

I may have access to a Mac this weekend, so I'll try testing with it to see if I can find a workaround too.

bongoerin commented 2 years ago

Thank you for the help. Installing the Xcode Command line tools package worked!