Posted on 02-04-2021 07:37 AM
After figuring out the error in my other Python thread, I'm now running into a different problem.
I used the relocatable python tool after following @tlarkin's clear instructions (thank you again!) to create a self-contained Python3 environment that can be shipped out to client machines. I then changed the environment on the script itself to reflect the location of the self-contained py3 environment (specifically, the symlink):
The script works when invoked from Self Service on both my own machine and a VM, but does not work on any of my colleagues machines. The error they're receiving is:
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
I'm not sure how to resolve since I can confirm the
tkinter module is installed correctly and works in the self-contained environment. To test, I invoked it from the path
I assume this is because of a Python path issue, but I'm not entirely sure. Any help would be greatly appreciated!
Posted on 02-04-2021 11:39 AM
pip list for your python packages?
Does it list the proper packages and versions? Did you install your Python into
Posted on 02-04-2021 12:07 PM
What does pip list for your python packages?
Does it list the proper packages and versions? Did you install your Python into /Library?
tkinter, but I can see the module under
/opt/advisory/py3/Python.framework/Versions/3.9/lib/python3.9. However, I don't see it under the
RE; installing Python to
/Library - I think so. I originally installed the Python.org 3.9.1 version to the default location.
Posted on 02-04-2021 12:11 PM
So, when I build my py3 env I used a requirements.txt file and I use that feature in relo python to do so. Which is just this, I don't ship a lot of extra modules yet.
requests xattr pyobjc requests-oauthlib
so then when I package up my Framework folder those are in the site packages already. If
pip doesn't list it for your env perhaps it is not installed or the wrong versions? Is
tkinter a standard package? I haven't touched that module in a few years so I do not remember.
Looks like it is not included
pip3 list | grep -i "tk" pyobjc-framework-AppleScriptKit 6.2.2 pyobjc-framework-EventKit 6.2.2