У меня ошибка установки pip для моего контейнера docker. Если я явно устанавливаю шесть внутри контейнера, используя docker-compose run --rm app bash -c 'pip install six'
, он работает, но все мои действия на github по-прежнему терпят неудачу. Есть ли способ исправить это без использования опции --ignore-installed
? Мой Dockerfile:
FROM lambci/lambda:build-python3.6
WORKDIR /usr/app
ARG requirements_file="requirements-dev.txt"
ADD . /usr/app
RUN pip install --upgrade pip
# Generate requirements files.
RUN cd svc && \
pipenv lock --requirements --dev > requirements-dev.txt && \
pipenv lock --requirements > requirements.txt
RUN python -m venv /ve
RUN source /ve/bin/activate \
&& pip install -r requirements.txt \
&& pip install -r ${requirements_file}
, и я получаю сообщение об ошибке:
Traceback (most recent call last):
File "/ve/bin/pylint", line 5, in <module>
from pylint import run_pylint
File "/ve/lib/python3.6/site-packages/pylint/__init__.py", line 13, in <module>
from pylint.checkers.similar import Run as SimilarRun
File "/ve/lib/python3.6/site-packages/pylint/checkers/__init__.py", line 42, in <module>
from pylint.checkers.base_checker import BaseChecker, BaseTokenChecker
File "/ve/lib/python3.6/site-packages/pylint/checkers/base_checker.py", line 17, in <module>
from pylint.config import OptionsProviderMixIn
File "/ve/lib/python3.6/site-packages/pylint/config.py", line 49, in <module>
from pylint import utils
File "/ve/lib/python3.6/site-packages/pylint/utils/__init__.py", line 44, in <module>
from pylint.utils.ast_walker import ASTWalker
File "/ve/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 8, in <module>
from astroid import nodes
File "/ve/lib/python3.6/site-packages/astroid/__init__.py", line 166, in <module>
__import__(module[:-3])
File "/ve/lib/python3.6/site-packages/astroid/brain/brain_builtin_inference.py", line 15, in <module>
import six
ModuleNotFoundError: No module named 'six'