Search code examples
pythonmacoscurlhomebrew

Missing Dependencies on Client's macOS: Unable to Install Python and Essential Tools


I am trying to send my python script to my client, he has mac OS, with all dependencies missed like : CURL, WGET, Python, brew and git.

I have tried to install python 3.11.8 on his mac using macOS 64-bit universal2 installer from https://www.python.org/downloads/macos/, so the problem is that zsh could not find python. and I have tried to add the python directory to the system PATH like windows. but after adding the directory also zsh could not find python package. any advice? I want to open another last Anydesk session to solve it.


Solution

  • I have found that I could use pip library through the IDLE.

    import pip
    pip.main(['install','package'])
    

    I have tested this way in an python venv and it does work actualy, and I can run the python script with this command.

    exec(open('./app/filename.py').read())