Comments (5)
I can reproduce this bug.
- SwiftTF pre-built binary 03-05
- Ubuntu 16.04.4 LTS
- Python 2.7
- Install pip from
sudo apt install python-pip
pip install numpy
➜ swift usr/bin/swift -Iusr/lib/swift/clang/include
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44, Swift 2347c83692). Type :help for assistance.
1> import Python
2> Python.import("os")
$R0: Python.PyValue = <module 'os' from '/usr/lib/python2.7/os.pyc'>
3> Python.import("numpy")
Fatal error: 'try!' expression unexpectedly raised an error: exception:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: /home/phuc/.local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: PyExc_UserWarning
: file /home/swift-build/swift/stdlib/public/core/ErrorType.swift, line 184
Current stack trace:
0 libswiftCore.so 0x00007ffff2307cc0 _swift_stdlib_reportFatalErrorInFile + 215
1 libswiftCore.so 0x00007ffff22aa357 <unavailable> + 4268887
2 libswiftCore.so 0x00007ffff2022f0d <unavailable> + 1617677
3 libswiftCore.so 0x00007ffff22aa1ed <unavailable> + 4268525
4 libswiftCore.so 0x00007ffff22aa157 <unavailable> + 4268375
5 libswiftCore.so 0x00007ffff2023768 <unavailable> + 1619816
6 libswiftCore.so 0x00007ffff22aa100 <unavailable> + 4268288
7 libswiftCore.so 0x00007ffff2022f0d <unavailable> + 1617677
8 libswiftCore.so 0x00007ffff21e4988 <unavailable> + 3459464
9 libswiftCore.so 0x00007ffff20b1c5a <unavailable> + 2202714
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
Process 23371 stopped
* thread #1, name = 'repl_swift', stop reason = signal SIGILL: illegal instruction operand
frame #0: 0x00007ffff21e4990 libswiftCore.so`function signature specialization <Arg[1] = Exploded> of Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 144
libswiftCore.so`function signature specialization <Arg[1] = Exploded> of Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never:
-> 0x7ffff21e4990 <+144>: ud2
0x7ffff21e4992: nopw %cs:(%rax,%rax)
libswiftCore.so`function signature specialization <Arg[3] = Dead> of generic specialization <Swift._ContiguousArrayBuffer<Swift.UInt16>, Swift._IgnorePointer<Swift.UInt16>> of (extension in Swift):Swift._ArrayBufferProtocol._arrayOutOfPlaceUpdate<A where A1: Swift._PointerFunction, A.Element == A1.Element>(inout Swift._ContiguousArrayBuffer<A.Element>, Swift.Int, Swift.Int, A1) -> ():
0x7ffff21e49a0 <+0>: pushq %rbp
0x7ffff21e49a1 <+1>: movq %rsp, %rbp
Target 0: (repl_swift) stopped.
from swift.
These SO questions may be related:
- Numpy import fails on multiarray extension library when called from embedded Python within a C++ application
- Python ImportError - undefined symbol - for custom C++ module
from swift.
Is anyone able to successfully run Python.import("numpy")
in the REPL on Ubuntu?
If so, please comment with:
- Your version of Swift for TensorFlow
- Your Ubuntu version
- Your Python version
- How you installed NumPy
from swift.
@dan-zheng Could you cherry-pick related info and move this bug to JIRA? Thanks!
from swift.
Moved to SR-7757.
from swift.
Related Issues (20)
- Close all open issues and pull requests since this repository has been moved
- Python linking in xcode HOT 5
- Internal error when `public`s are removed from the catch model HOT 3
- Configuring swift-format's line breaking rule
- Add build instructions to Readme
- Error building swift-format HOT 1
- Translation of Google Swift Style Guide
- Unexpected newline before opening brace for method calls with trailing closures
- The rule NoAccessLevelOnExtensionDeclaration doesn't work
- testEagerLoop() in crashers.swift crashers in TFLowerGraph.cpp, after supporting TF tensor receives HOT 1
- Use SILPrinter callback mechanism to annotate the printed SIL code HOT 2
- Bridge Python `numpy.ndarray` to `Array` and `Tensor` HOT 2
- Crash when doing basic Swift's String Interpolation. HOT 10
- Non-data dependent code with side effects - should they sync? HOT 8
- Implement UseOnlySpaces HOT 1
- Implement UseTripleSlashForDocumentationComments HOT 1
- implement NeverUseForceTry HOT 1
- Implement NeverUseImplicitlyUnwrappedOptionals HOT 1
- Implement CyclomaticComplexityWarning.swift HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.