Problem in building swift for tensorflow

(Amit Kumar) #1

I have cloned the swift for tensorflow branch , -b tensorflow

while executing below command

./swift/utils/update-checkout --clone --scheme tensorflow

I'm getting this error

Traceback (most recent call last): File "./swift/utils/update-checkout", line 5, in <module> import update_checkout File "/Users/amit/Desktop/swift-source/swift/utils/update_checkout/", line 2, in <module> from update_checkout import main ImportError: cannot import name 'main'

. I'm trying to build it for the first time from the directory swift-source

[GSoC-19] IndexStoreDB Error
(Neil Jones) #2

Can you give some more info on your build platform?
For example which OS, macOS or Linux and hardware e.g. x86_64, AArch64 etc.
Also in your bug report you say you are using this build command - ./swift/utils/update-checkout --clone-with-ssh --scheme tensorflow
Where as here you say you are using ./swift/utils/update-checkout --clone --scheme tensorflow.
Are they both giving the same error?

(Amit Kumar) #3

I tried to build this on macos mojave 64bit , I used only ./swift/utils/update-checkout --clone --scheme tensorflow .

(Timothy Vincent) #4

Hi Amit,

I had the same problem and found that it was because swift expects python 2.7 and was finding my 3.6.5 version.

To solve the problem I installed Anaconda3 and did a conda create -n py2 python=2.7 followed by conda activate py2 to ensure the script ran under 2.7.

Hope this helps,


(Amit Kumar) #5

Huge Thanks @timvinc , This really worked :grinning: !

1 Like
(Amit Kumar) #6

This information must be included in the file as well.