Reputation: 21
I am using pipenv, Docker 19.03.8, django 3.0.1 framework, and python 3.8.2 (checked by python --version). When I am trying to install psycopg2-binary by using $ docker-compose exec web pipenv install psycopg2-binary==2.8.3
, I got the error:
Warning: Python 3.8 was not found on your system…
Neither 'pyenv' nor 'asdf' could be found to install Python.
You can specify specific versions of Python with:
$ pipenv --python path/to/python
My Pipfile contains:
[requires]
python_version = "3.8"
Dockerfile contains:
FROM python:3.8
docker-compose.yml contains:
version: '3.8'
I have tried installing pyenv
and asdf
(as suggested in the error message) via brew
, and still got the error.
I have also tried specifying the version by using $ pipenv --python /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
and $ pipenv --python /Users/dhafinrazaq/.pyenv/versions/3.8.2/bin/python3.8
, but still get the error.
Upvotes: 2
Views: 1909
Reputation: 41
$ docker-compose exec web pipenv --python /usr/bin/python3 install psycopg2-binary==2.8.3
you can give your python installation path like i have given above. I have bolded that part in above code. it worked for me. --python /usr/bin/python3 add this part.
Upvotes: 4