Dependencies not being installed if I use a Pipfile
See original GitHub issueI 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Pipenv install does not install everything from Pipfile
Installing from this pipfile using pipenv install worked fine, and all packages were installed. I am not exactly sure why this all happened, ......
Read more >Common Pipenv Errors and How to Solve Them: Why Won't it ...
Pipfile won't lock when it tries to install packages that don't exist, i.e., typos. ... Pipenv looks for the package you specify, whether...
Read more >Frequently Encountered Pipenv Problems - Read the Docs
☤ Pipenv does not respect dependencies in setup.py No, it does not, intentionally. Pipfile and setup.py serve different purposes, and should not consider...
Read more >Manage dependencies using Pipfile - IntelliJ IDEA - JetBrains
Consider a case when you've checked out or updated the project source files and see the following message: packages that are listed in...
Read more >How to Manage Python Dependencies with Virtual ...
The pipenv install –skip-lock command option can be used to skip the pipfile.lock. If for any reason the pipfile.lock is not updated, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hand-written Pipfile works on my machine.
@josh-gree Yes. In most situations the lock file is the target Pipenv tries to sync your environment to. Pipfile generates the lock file; the lock file generates the environment. If the lock file exists (and is not oudated, judged from a hash coded inside it), Pipenv will simply use it without consulting the Pipfile.