Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipenv 11.10.4 doesn't resolve/install package's dependencies reliably #2083

Closed
flbraun opened this issue Apr 28, 2018 · 3 comments
Closed

Comments

@flbraun
Copy link

flbraun commented Apr 28, 2018

Pipenv 11.10.4 doesn't resolve/install package's dependencies reliably.

Expected result

Correct parsing, locking and installation of a package's install_requires as stated in their setup.py.

Actual result

Some dependencies are not locked in Pipfile.lock and therefore not installed, but pipenv graph shows them as installed.

Steps to replicate
chiron@chiron-pc:~/Documents/casita$ pipenv --version
pipenv, version 11.10.1
chiron@chiron-pc:~/Documents/casita$ cat Pipfile 
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
django = "*"
django-jinja = "*"
django-money = "*"
django-stronghold = "*"
django-crispy-forms = "*"
django-extensions = "*"
feedparser = "*"
django-lifecycle = "*"

[dev-packages]
django-debug-toolbar = "*"
jupyter = "*"

[requires]
python_version = "3.6"
chiron@chiron-pc:~/Documents/casita$ pipenv --three
Creating a virtualenv for this project…
Using /usr/bin/python3 (3.6.3) to create virtualenv…
⠋Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/chiron/.local/share/virtualenvs/casita-CQsjLFQc/bin/python3
Also creating executable in /home/chiron/.local/share/virtualenvs/casita-CQsjLFQc/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/chiron/.local/share/virtualenvs/casita-CQsjLFQc
chiron@chiron-pc:~/Documents/casita$ pipenv sync --dev
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (6a553e)!
Installing dependencies from Pipfile.lock (6a553e)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 13/13 — 00:00:09
To activate this project's virtualenv, run the following:
 $ pipenv shell
All dependencies are now up-to-date!
chiron@chiron-pc:~/Documents/casita$ pipenv shell
Spawning environment shell (/bin/bash). Use 'exit' to leave.
chiron@chiron-pc:~/Documents/casita$ . /home/chiron/.local/share/virtualenvs/casita-CQsjLFQc/bin/activate
(casita-CQsjLFQc) chiron@chiron-pc:~/Documents/casita$ pipenv graph
django-crispy-forms==1.7.2
django-debug-toolbar==1.9.1
  - Django [required: >=1.8, installed: 2.0.4]
    - pytz [required: Any, installed: 2018.4]                            # will be installed
  - sqlparse [required: >=0.2.0, installed: ?]                          # will NOT be installed
django-extensions==2.0.7
  - six [required: >=1.2, installed: 1.11.0]
django-jinja==2.4.1
  - django [required: >=1.8, installed: 2.0.4]
    - pytz [required: Any, installed: 2018.4]                             # will be installed
  - jinja2 [required: >=2.5, installed: 2.9.5]                             # will NOT be installed
django-lifecycle==0.3.0
django-money==0.13.2
  - Django [required: >=1.8, installed: 2.0.4]
    - pytz [required: Any, installed: 2018.4]                             # will be installed
  - py-moneyed [required: >=0.7, installed: 0.7.0]                 # will be installed
  - setuptools [required: Any, installed: 39.1.0]                      # bootstrapped with venv
django-stronghold==0.3.0
feedparser==5.2.1
jupyter==1.0.0
  - ipykernel [required: Any, installed: ?]                               # will NOT be installed
  - ipywidgets [required: Any, installed: ?]                             # will NOT be installed
  - jupyter-console [required: Any, installed: ?]                     # will NOT be installed
  - nbconvert [required: Any, installed: ?]                              # will NOT be installed
  - notebook [required: Any, installed: ?]                              # will NOT be installed
  - qtconsole [required: Any, installed: ?]                              # will NOT be installed
(casita-CQsjLFQc) chiron@chiron-pc:~/Documents/casita$ pipenv run pip freeze
Django==2.0.4
django-crispy-forms==1.7.2
django-debug-toolbar==1.9.1
django-extensions==2.0.7
django-jinja==2.4.1
django-lifecycle==0.3.0
django-money==0.13.2
django-stronghold==0.3.0
feedparser==5.2.1
jupyter==1.0.0
py-moneyed==0.7.0
pytz==2018.4
six==1.11.0
@techalchemy
Copy link
Member

Thanks for the report and sorry for the frustration! You didn't include your lockfile so I can't really see what it contains, but I can make some general statements because we do have an issue with the resolver

Ipython is specifically affected by this (and therefore so is jupyter to some extent), and as you can see pipenv graph says installed: ?

I'm going to close this issue because we are tracking resolver issues in #1901 for now, but thanks for letting us know!

P.S. The release you mentioned is a development release, there is an actual release out which you should install

@flbraun
Copy link
Author

flbraun commented Apr 29, 2018

Hey, thanks for the quick response!

Okay, the IPython-related problem is a bit annoying, but I can live with that, currently not using Notebook alot.

However - just to clarify - the resolving problem seems not to be limited to IPython.
In my given case Jinja2 (dependency of django-jinja) will not be installed although pipenv graph claims it is installed, but it's not in the output of pipenv run pip freeze. Also Django's runserver will crash upon template rendering with ImportError: No module named 'jinja2'. So it's 100% not installed.
Or is this some sort of crossover issue with IPython packages being part of the pipenv sync call?

Can't provide a lockfile right know as I don't have access to my laptop for a couple of days, but I can remember that my missing dependencies weren't appearing in the lockfile either.

@techalchemy
Copy link
Member

I’m just making a lot of possibly incorrect assumptions about the connection between these issues, there’s a branch you can try from #2076pip install -e git+https://github.com/pypa/pipenv.git@bugfix/1952-install-only-current-python#egg=pipenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants