Has anyone successfully setup Jupyter for S4TF on macOS without Docker? Looks like the main challenge is to install a Swift toolchain with LLDB Python3 support – and for non Ubuntu 18.04 systems that requires building from sources.
See:
I’ll update once I get it working.
Currently hitting the error:
In Getting Sources for Swift and Related Projects (HTTPS):
git clone https://github.com/apple/swift.git -b tensorflow
./swift/utils/update-checkout --clone --scheme tensorflow
That last line causes:
Traceback (most recent call last):
File "./swift/utils/update-checkout", line 5, in <module>
import update_checkout
File "/Users/WayNoxchi/Developer/swift-source/swift/utils/update_checkout/__init__.py", line 2, in <module>
from update_checkout import main
ImportError: cannot import name 'main'
Not something I’ve seen before. Doesn’t exactly look like a similar pip error other’s experienced.
So, in swift-source/swift/utils/update_checkout/ , __init__.py
is trying to do:
from update_checkout import main
__all__ = ["main"]
And then it can’t find the name “main”. __init__.py
is inside …/update_checkout/ so I’m not sure what/how it’s importing … but since this is Python “main” should be referencing the original .py file running … so if it can’t find that something either very serious or very silly went wrong.
update to that:
From the Swift forums: Problem in building swift for tensorflow;
Looks like the ghost of Python 2 is still out there… you can follow Timothy Vincent’s post exactly. Rerunning in a Python 2.7 environment got everything to start working. I submitted a PR for the ReadMe.
issue 2: currently held up when running:
SWIFT_PACKAGE=tensorflow_linux,no_test ./swift/utils/build-toolchain local.swift
a modification in google/swift-jupyter:(optional) Building toolchain with LLDB Python3 support to replace running utils/build-script
in apple/swift:Building Swift with TensorFlow support.
Error:
./utils/build-script: note: Using toolchain default
+ mkdir -p /Users/WayNoxchi/Developer/swift-source/build/buildbot_linux
./utils/build-script: fatal error: can't find source directory for libicu (tried /Users/WayNoxchi/Developer/swift-source/icu)
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
I guess I have to find/install libicu
then. Is it because I may/not have the Python 3 deveopment headers? The google/swift-jupyter ReadMe only gives installation instructions for Ubuntu 18.04.
update:
Following along installing libicu-dev on mac, looks like I already have icu (icu4c)… so do I point clang / swift there (and how)? Or is there something else missing…