Skip to content

Not working in heroku #62

Closed
Closed
@umlx5h

Description

@umlx5h

Hi.
Can this gem work in heroku environment?
I use python 3.6, ruby 2.5.0 and rails 5.1.4 version in heroku.

I set PYCALL_DEBUG_FIND_LIBPYTHON=1 variable and got an following error.

Loading production environment (Rails 5.1.4)
irb(main):001:0> require 'pycall/import'
=> false
irb(main):002:0> include PyCall::Import
=> Object
irb(main):003:0> pyimport :math
DEBUG(find_libpython) find_libpython(".heroku/python/bin/python")
DEBUG(find_libpython) investigate_python_config(".heroku/python/bin/python")
DEBUG(find_libpython) libs: ["libpython3.6m.a", "libpython3.6m", "libpython3.6", "libpython"]
DEBUG(find_libpython) libpaths: ["/app/.heroku/python/lib", "/app/.heroku/python/lib", "", "/app/.heroku/python", "/app/.heroku/python/lib"]
DEBUG(find_libpython) Fiddle::DLError: /app/.heroku/python/lib/libpython3.6m.a: invalid ELF header
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a.so
DEBUG(find_libpython) Fiddle::DLError: /app/.heroku/python/lib/libpython3.6m.a: invalid ELF header
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /libpython3.6m.a
DEBUG(find_libpython) Unable to find /libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6m.a
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6m.a
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6m.a
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6m.a.so
DEBUG(find_libpython) Fiddle::DLError: /app/.heroku/python/lib/libpython3.6m.a: invalid ELF header
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.a.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.so
DEBUG(find_libpython) Unable to find /libpython3.6m
DEBUG(find_libpython) Unable to find /libpython3.6m.so
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6m
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6m.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6.so
DEBUG(find_libpython) Unable to find /libpython3.6
DEBUG(find_libpython) Unable to find /libpython3.6.so
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython3.6.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython.so
DEBUG(find_libpython) Unable to find /libpython
DEBUG(find_libpython) Unable to find /libpython.so
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython
DEBUG(find_libpython) Unable to find /x86_64-linux-gnu/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/x86_64-linux-gnu/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/libpython.so
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython
DEBUG(find_libpython) Unable to find /app/.heroku/python/lib/x86_64-linux-gnu/libpython.so
DEBUG(find_libpython) Fiddle::DLError: /app/.heroku/python/lib/libpython3.6m.a: invalid ELF header
DEBUG(find_libpython) Fiddle::DLError: libpython3.6m: cannot open shared object file: No such file or directory
DEBUG(find_libpython) Fiddle::DLError: libpython3.6: cannot open shared object file: No such file or directory
DEBUG(find_libpython) Fiddle::DLError: libpython: cannot open shared object file: No such file or directory
Traceback (most recent call last):
        1: from (irb):3
PyCall::PythonNotFound (PyCall::PythonNotFound)

Python can work by using command.

Loading production environment (Rails 5.1.4)
irb(main):001:0> system('python --version')
Python 3.6.4
=> true
irb(main):002:0> system('which python')
/app/.heroku/python/bin/python
=> true
irb(main):003:0> system('echo $PATH')
/app/vendor/bundle/ruby/2.5.0/bin:/app/bin:/app/vendor/bundle/bin:vendor/yarn-v1.0.2/bin/:/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin
=> true
irb(main):004:0>

thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions