No module named pip
manishgotame
PROOP

a month ago

I was trying to install a library into my backend and I am using nixpacks. Here is the config file:

providers = ["python"]

[phases.setup]

aptPkgs = ["tesseract-ocr", "libgl1"]

[phases.install]

cmds = [

"git config --global url."https://x-access-token:${GH_TOKEN}@github.com/\".insteadOf "https://github.com/\"",

"python -m pip install --system -r requirements.txt"

]

But I keep running into the issue of "no module named pip" during the build.

Solved$20 Bounty

Pinned Solution

a month ago

Nixpacks is deprecated, i recommend to move to Railpack instead, on your service settings, scroll to the Build section and change your Builder to Railpack

For apt packages, you can configure it by adding RAILPACK_BUILD_APT_PACKAGES="tesseract-ocr libgl1" to your service variables

I created a minimal reproduce repo with same config file as you share, i didnt see that error until i change my builder from Railpack (Default) to Nixpacks

3 Replies

Railway
BOT

a month ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway about 1 month ago


a month ago

Nixpacks is deprecated, i recommend to move to Railpack instead, on your service settings, scroll to the Build section and change your Builder to Railpack

For apt packages, you can configure it by adding RAILPACK_BUILD_APT_PACKAGES="tesseract-ocr libgl1" to your service variables

I created a minimal reproduce repo with same config file as you share, i didnt see that error until i change my builder from Railpack (Default) to Nixpacks


manishgotame
PROOP

a month ago

Thank you! This worked for me.


a month ago

Glad it works!


Status changed to Solved brody about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...