Python 3 installation on mac os
Categories
(Infrastructure & Operations :: RelOps: Puppet, task)
Tracking
(Not tracked)
People
(Reporter: chmanchester, Unassigned)
References
Details
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
(In reply to Chris Manchester (:chmanchester) from comment #0)
I'm working on getting an initial version of macOS PGO stood up in
taskcluster. Because we're cross-compiling the mac builds we need to run
this as three separate tasks, with the middle task running the build on
native mac hardware in order to generate a profile.
catlee and I talked a bit about this recently; we're going to need to create a dedicated pool of minis for this, so that there remains a separation between lvl1 and lvl3 systems. right now, it's one big pool.
I'm hitting some issues related to the python 3 installation on these
machines: the first is that /usr/bin/python3 doesn't exist on these
machines, so scripts that start with "#!/usr/bin/python3 -u" aren't able to
run. There is a python 3 installation present at
"/tools/python36/bin/python3.6", however there appear to be some system
libraries missing as using this immediately fails when attempting to import
lzma.
:dragrom, you did most of the work around python 3, can you help out here?
Comment 5•6 years ago
|
||
(In reply to Kendall Libby [:fubar] (he/him) from comment #4)
(In reply to Chris Manchester (:chmanchester) from comment #0)
I'm working on getting an initial version of macOS PGO stood up in
taskcluster. Because we're cross-compiling the mac builds we need to run
this as three separate tasks, with the middle task running the build on
native mac hardware in order to generate a profile.catlee and I talked a bit about this recently; we're going to need to create a dedicated pool of minis for this, so that there remains a separation between lvl1 and lvl3 systems. right now, it's one big pool.
I'm hitting some issues related to the python 3 installation on these
machines: the first is that /usr/bin/python3 doesn't exist on these
machines, so scripts that start with "#!/usr/bin/python3 -u" aren't able to
run. There is a python 3 installation present at
"/tools/python36/bin/python3.6", however there appear to be some system
libraries missing as using this immediately fails when attempting to import
lzma.
The python3 is installed on /tools/python36/bin/python3.6 and have symlink: /usr/local/bin/python3.
https://tools.taskcluster.net/groups/TVm9HJWEQ8-ile2bokAA6A/tasks/TVm9HJWEQ8-ile2bokAA6A/runs/0/logs/public%2Flogs%2Flive_backing.log
The PATH from the environment used by generic-worker is not the same with PATH used by OSX. To fix this, I created the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1507488.
Please give me more details about missing libraries.
:dragrom, you did most of the work around python 3, can you help out here?
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Dragos Crisan [:dragrom] from comment #5)
Please give me more details about missing libraries.
Certainly. Thank you for your help. The issue can by seen in this try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9563948446bfeec6b0d4b12189291ccaf599a4b8&selectedJob=218074339
Running just import lzma
should reproduce the issue.
Reporter | ||
Comment 7•6 years ago
|
||
Hello Dragos, is comment 6 enough to go from? Is this something you're able to work on?
Comment 8•6 years ago
|
||
(In reply to Chris Manchester (:chmanchester) from comment #7)
Hello Dragos, is comment 6 enough to go from? Is this something you're able to work on?
run on OSX the following tests:
- entered in python3 environment
[root@t-yosemite-r7-380.test.releng.mdc1.mozilla.com ~]# python3 - imported lzma
import lzma
-
the output
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tools/python36/lib/python3.6/lzma.py", line 27, in <module>
from _lzma import *
ModuleNotFoundError: No module named '_lzma' -
run help('lzma')
problem in lzma - ModuleNotFoundError: No module named '_lzma' -
run help('_lzma')
No Python documentation found for '_lzma'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
from what I saw, module lzma is installed on /tools/python36/lib/python3.6/.
[root@t-yosemite-r7-380.test.releng.mdc1.mozilla.com ~]# find / -name lzma*
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/tools/python36/lib/python3.6/pycache/lzma.cpython-36.opt-1.pyc
/tools/python36/lib/python3.6/pycache/lzma.cpython-36.opt-2.pyc
/tools/python36/lib/python3.6/pycache/lzma.cpython-36.pyc
/tools/python36/lib/python3.6/lzma.py
Looking over _lzma, no module found in OSX:
[root@t-yosemite-r7-380.test.releng.mdc1.mozilla.com ~]# find / -name _lzma*
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
Looking on linux workers, and running the following command: find / -name _lzma*, I received the following result:
/usr/lib/python3.5/lib-dynload/_lzma.cpython-35m-x86_64-linux-gnu.so
Looks like python3.6.5 standard package for OSX not have lzma support. need to create a custom dmg file to add lzma support.
Reporter | ||
Comment 9•6 years ago
|
||
The dependent bug mentioned in comment 8 took care of this. Thanks all!
Description
•