Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Docker FROM ruby:2.7.1 and PyCall::PythonNotFound #126

Open
mberrueta opened this issue Aug 28, 2020 · 0 comments
Open

Issues with Docker FROM ruby:2.7.1 and PyCall::PythonNotFound #126

mberrueta opened this issue Aug 28, 2020 · 0 comments

Comments

@mberrueta
Copy link

Hello there,

First, thanks for this great library!

I'm getting issues with a Docker image (locally PyCall works well)

FROM ruby:2.7.1

ENV PYTHON /usr/bin/python3
ENV LIBPYTHON /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1
ENV PYTHONHOME /usr/lib/python3.7
ENV PYTHONPATH /usr/lib/python3.7

RUN apt-get update && apt-get upgrade -y && apt-get clean && apt-get install -y build-essential
RUN apt-get install -y curl python3.7 python3.7-dev python3.7-distutils
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
  python get-pip.py --force-reinstall && \
  rm get-pip.py

ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

RUN gem install bundler:2.1.4
ADD Gemfile* $APP_HOME/
RUN bundle install

ENV PORT 3000
EXPOSE $PORT

ADD . $APP_HOME
RUN pip install --target . --requirement ./lib/scripts/requirements.txt
CMD rails server

getting PyCall::PythonNotFound and uninitialized constant PyCall::LibPython::Helpers

do you have an example of how to build it properly? or whats the error?

Ty in advance!!

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

No branches or pull requests

1 participant