Swift: No such module 'FoundationNetworking'

Created on 18 Jun 2020  路  3Comments  路  Source: tensorflow/swift

I've tried both releases 0.9.0 and 0.10.0 on Xcode macOS command line tool using both build systems. I always get error No such module 'FoundationNetworking'

Most helpful comment

I think FoundationNetworking is available only on Linux and you should use Foundation on macOS. You can use

#if canImport(FoundationNetworking)
    import FoundationNetworking
#endif

if you need support of both platforms.

All 3 comments

Hey @Zandew! Do import TensorFlow and basic tensor operations work using the CL tool in your environment? If you can provide more context that'd be awesome. I assume you're running import FoundationNetworking or something. Thanks

I think FoundationNetworking is available only on Linux and you should use Foundation on macOS. You can use

#if canImport(FoundationNetworking)
    import FoundationNetworking
#endif

if you need support of both platforms.

I'm following https://www.tensorflow.org/swift/tutorials/model_training_walkthrough this tutorial and with further observation, it looks like I can still do it without that import (?)

Was this page helpful?
0 / 5 - 0 ratings