Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Import error. #37

Closed
eldardamirov opened this issue Jun 6, 2018 · 17 comments
Closed

Import error. #37

eldardamirov opened this issue Jun 6, 2018 · 17 comments

Comments

@eldardamirov
Copy link

Reinstalled several times, but Xcode constantly gives import error. It is impossible to import "TensorFlow", but for some reason sometimes "CTensorFlow" is suggested by Xcode suggestions.
2018-06-06 10 07 42

Also, in some cases playground just goes in infinite compilation, or works very very slow. What this could be caused by and how may I solve this problems?
Thanks in advance.

Xcode 9.4
macOS 10.13.5

@rxwei
Copy link
Contributor

rxwei commented Jun 6, 2018

Code completion not suggesting "TensorFlow" is a known bug. However, import should still work.

In your case, could you try restarting Xcode?

@dan-zheng
Copy link
Member

dan-zheng commented Jun 6, 2018

Which toolchain are you using?
Does importing the TensorFlow module work with Swift command line tools? (swift, swiftc)

@eldardamirov
Copy link
Author

eldardamirov commented Jun 6, 2018

I have downloaded latest toolchain yesterday:
2018-06-06 11 11 29
I've already restarted Xcode and even Mac several times, but nothing happened.
I've tried importing TF in REPL and just command line and got same error, but I haven't done any setup before, should I?

@dan-zheng
Copy link
Member

dan-zheng commented Jun 6, 2018

To be clear, does the following fail?

export PATH=/Library/Developer/Toolchains/swift-latest/usr/bin:"${PATH}"
echo "import TensorFlow\nlet x = Tensor(1)" > test.swift
swift test.swift

If it does fail, please share the error.

@eldardamirov
Copy link
Author

eldardamirov commented Jun 6, 2018

No, that doesn't fail, but in Xcode still doesn't work..

@zhuiyizhiqiu
Copy link

@eldardamirov Can you give me the latest download link? I can not find .

@rxwei
Copy link
Contributor

rxwei commented Jun 7, 2018

@zhuiyizhiqiu
Copy link

@rxwei "Download the latest package release" can not click.
2018-06-08 10 29 01

@dan-zheng
Copy link
Member

@zhuiyizhiqiu Please select a package from the "pre-built packages" section.

screen shot 2018-06-07 at 8 17 03 pm

In the future, please create a new issue if you have a specific question instead of commenting on an existing issue.

@dan-zheng
Copy link
Member

@eldardamirov
Has Xcode 9.4 ever worked for you, or not even once?
I'll download Xcode 9.4 tonight and see if I can replicate your errors.

It's known that the latest 06-01 toolchain doesn't work with the new Xcode 10 beta.
Playgrounds fail with the error: "LLDB RPC server has crashed". We're looking into this also: it's possible this will be fixed when we merge changes from upstream.

@zhuiyizhiqiu
Copy link

@dan-zheng Thanks.

@dan-zheng
Copy link
Member

dan-zheng commented Jun 8, 2018

I verified that the 06-01 toolchain is problematic on Xcode 9.4.
The reason appears to be codesigning-related, from the Console log.
(It could also be fixed by merging upstream changes for lldb.)

I'll try to fix this within a week.

@eldardamirov
Copy link
Author

Sorry, I've been busy this week, so couldn't take part in discussion. Yes, Xcode 9.4 has never worked for me, same thing with Xcode 10, but it is only first beta, so it has many issues beside this one. Looking forward to fixes)

@taharvey
Copy link

Tried on 9.4 and 10.0 Can't get tensorflow to work

@dan-zheng
Copy link
Member

I apologize, I didn't get around to fixing codesigning this week.
Fixing the build for newer Xcode versions is my next priority after finishing my current tasks (automatic differentiation infrastructure). Currently, I believe our toolchains work only with Xcode 9.3 (and under).

A realistic ETA for working toolchains for Xcode 9.4/10 is 1.5-2 weeks from today. Thanks for your patience!

@eldardamirov
Copy link
Author

Ok, thanks for your assistance.

@dan-zheng
Copy link
Member

Closing, since issue is not reproducible.


The latest 6/29 prebuilt toolchain supports Xcode 10:
screen shot 2018-06-30 at 4 28 42 am

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants