pipenv: Dependencies not being installed if I use a Pipfile

I am having issues installing Flask using pipenv

I have tried two approaches. Firstly installing from a Pipfile;

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"

[requires]
python_version = "3.6"

I then run pipenv install the output of the command is as follows;

Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/bin/python3.6
Also creating executable in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (011179)!
Installing dependencies from Pipfile.lock (011179)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell

The output of pipenv graph is the following;

Flask==0.12.2
  - click [required: >=2.0, installed: 6.7]
  - itsdangerous [required: >=0.21, installed: ?]
  - Jinja2 [required: >=2.4, installed: 2.9.5]
  - Werkzeug [required: >=0.7, installed: ?]

If I try to import flask in the python shell started with pipenv python I get missing library werkzeug error.

The second approach which works is to start without a Pipfile and just run pipenv install flask the output of which is;

Creating a Pipfile for this project…
Installing flask…
Requirement already satisfied: flask in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages
Requirement already satisfied: click>=2.0 in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages (from flask)
Requirement already satisfied: Werkzeug>=0.7 in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages (from flask)
Requirement already satisfied: itsdangerous>=0.21 in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages (from flask)
Requirement already satisfied: Jinja2>=2.4 in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages (from flask)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/josh-gree/.local/share/virtualenvs/pipenv_test-dFjl2l40/lib/python3.6/site-packages (from Jinja2>=2.4->flask)

Adding flask to Pipfile's [packages]…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (011179)!
Installing dependencies from Pipfile.lock (011179)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell

The Pipfile generated is;

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"

[dev-packages]

[requires]
python_version = "3.6"

and the output of pipenv graph is;

Flask==0.12.2
  - click [required: >=2.0, installed: 6.7]
  - itsdangerous [required: >=0.21, installed: 0.24]
  - Jinja2 [required: >=2.4, installed: 2.10]
    - MarkupSafe [required: >=0.23, installed: 1.0]
  - Werkzeug [required: >=0.7, installed: 0.14.1]

I get no import errors!

Any help would be appreciated!? This worked perfectly less than a week ago…

I am using pipenv version 11.8.3

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hand-written Pipfile works on my machine.