Git Product home page Git Product logo

Comments (5)

lkhphuc avatar lkhphuc commented on May 5, 2024 2

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.

dan-zheng avatar dan-zheng commented on May 5, 2024

These SO questions may be related:

from swift.

dan-zheng avatar dan-zheng commented on May 5, 2024

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.

rxwei avatar rxwei commented on May 5, 2024

@dan-zheng Could you cherry-pick related info and move this bug to JIRA? Thanks!

from swift.

dan-zheng avatar dan-zheng commented on May 5, 2024

Moved to SR-7757.

from swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.