Skip to main content
Solved

Import python library


Forum|alt.badge.img+3

Hello , 

I've got problem with python script ,  first line of script have command to import :

import os.path ,os , getpass

but Jamf PRO have problem like below:
line 1: import: command not found

Do you have some tips how to solve it ? 

Best answer by sdagley

@kdpk If your script is Python it must start with a #! line with a path to the Python interpreter installation on your Mac (Python is no longer installed by default)

The MacAdmins Python package is a good place to start if you don't already have a preferred Python distro: https://github.com/macadmins/python

View original
Did this topic help you find an answer to your question?

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • January 13, 2023

@kdpk If your script is Python it must start with a #! line with a path to the Python interpreter installation on your Mac (Python is no longer installed by default)

The MacAdmins Python package is a good place to start if you don't already have a preferred Python distro: https://github.com/macadmins/python


Forum|alt.badge.img+1
  • New Contributor
  • January 16, 2023
  1. Save this code in a file named mymodule.py. ...
  2. Import the module named mymodule, and call the greeting function: ...
  3. Save this code in the file mymodule.py. ...
  4. Import the module named mymodule, and access the person1 dictionary: ...
  5. Create an alias for mymodule called mx : ...
  6. Import and use the platform module: fusd atlas


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings