OpenHumans / oh-data-source-template

Template/Demo Django + Celery app you can use to create an OAuth2 data source activity for Open Humans.
Other
3 stars 9 forks source link

Pipenv install updating Pipfile to Python 3 packages when using Python 2 #12

Open EspressoTime opened 6 years ago

EspressoTime commented 6 years ago

When running pipenv install it says Pipfile.lock (388f00) out of date, updating to (89bf08) and then An error occurred while installing django==2.0.3.

I think since the Pipfile has the Django package listed as a wildcard it is updating Pipfile.lock to the latest version (which is only compatible with Python 3) and overwriting the specified version in Pipfile.lock.

To fix this I used pipenv install --ignore-pipfile to use the versions in the pipfile.lock. Would it be helpful to create a pull request for the README to add instructions for this error?

There is an option to use pipenv install --two to specifically use Python 2 that might work, but I didn't get a chance to try it.

gedankenstuecke commented 6 years ago

Thanks for opening the issue!

I think the problem with the out of date error is that someone updated the Pipfile at some point but forgot to also commit the new Pipfile.lock, this is why it complains.

It is weird though that pipenv install would try to go for a package that doesn't work with Python 2.7, as the Pipfile specifies that 2.7 is the required version. It would be good to see whether pipenv install --two can solve this.

@mcescalante do you have opinions on this?

mikepsinn commented 3 years ago

I think I fixed this with #13