I have been running into this problem recently with all my Python project where CircleCI Linux environment can’t seem to find Python.
Here is the error message:
#!/bin/bash -eo pipefail
pipenv sync
Warning: Your Pipfile requires python_version 3.6, but you are using None (/home/c/.local/share/v/r/bin/python).
$ pipenv check will surely fail.
Installing dependencies from Pipfile.lock (609aec)...
An error occurred while installing atomicwrites==1.1.5! Will try again.
An error occurred while installing attrs==18.1.0! Will try again.
An error occurred while installing click==6.7! Will try again.
An error occurred while installing flask==1.0.2! Will try again.
An error occurred while installing itsdangerous==0.24! Will try again.
An error occurred while installing jinja2==2.10! Will try again.
An error occurred while installing markupsafe==1.0! Will try again.
An error occurred while installing more-itertools==4.2.0! Will try again.
An error occurred while installing pluggy==0.6.0! Will try again.
An error occurred while installing py==1.5.4! Will try again.
An error occurred while installing pytest==3.6.3! Will try again.
An error occurred while installing six==1.11.0! Will try again.
An error occurred while installing werkzeug==0.14.1! Will try again.
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 13/13 — 00:00:00
Installing initially failed dependencies...
/home/circleci/.local/share/virtualenvs/repo-eQF46Ow3/bin/python3.6m: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/13 — 00:00:00
Exited with code 127
Here is my configuration file:
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: pipenv sync
- save_cache:
paths:
- ~/.local
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
# run tests!
- run:
name: run tests
command: pipenv run pytest
- store_artifacts:
path: test-reports
destination: test-reports
Does anyone know how to solve this problem?
Thanks in advance.