question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv ignores `PIP_NO_BINARY` and still installs wheel

See original GitHub issue

I am trying to run the following command: export PIP_NO_BINARY=1 && pipenv install psycopg2 as it was suggested in https://github.com/pypa/pipenv/issues/1430

But this does not have any effect.

» export PIP_NO_BINARY=1 && pipenv install psycopg2
Installing psycopg2…
Collecting psycopg2
  Using cached psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: psycopg2
Successfully installed psycopg2-2.7.4

Adding psycopg2 to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (635dd7)!

Please, note that pip is using cache, let’s turn it off.

» PIP_NO_BINARY=1 PIP_NO_CACHE_DIR=off pipenv install psycopg2   
Installing psycopg2…
Collecting psycopg2
  Downloading psycopg2-2.7.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.7MB)
Installing collected packages: psycopg2
Successfully installed psycopg2-2.7.4

Adding psycopg2 to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (635dd7)!

What I expect is that pipenv would install psycopg2 from source. And now it is using wheel.

Describe your environment
  1. OS Type: macos
  2. Python version: 3.6.4
  3. Pipenv version: 9.0.3
Steps to replicate
  1. PIP_NO_BINARY=1 PIP_NO_CACHE_DIR=off pipenv install psycopg2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:30 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
Quidgecommented, Jun 13, 2018

@OrangeDog I updated to ver 2018.05.18 and it works as you said it would. What I’ve done using this new 2018.05.18 version, is the same series of steps that @sobolevn attempts with a different result.

Below is a log indicating the issues with the PIP_NO_BINARY env var that @sobolevn has experienced no longer seem to be an issue with ver 2018.05.18.

JohnathMacBook3:~ lirum$ mkdir temp
JohnathMacBook3:~ lirum$ cd temp
JohnathMacBook3:temp lirum$ export PIP_NO_BINARY=psycopg2
JohnathMacBook3:temp lirum$ pipenv install
Creating a virtualenv for this project…
Using /usr/local/opt/python/bin/python3.6 (3.6.5) to create virtualenv…
⠋Already using interpreter /usr/local/opt/python/bin/python3.6
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/lirum/Envs/temp-bhSkAFEf/bin/python3.6
Also creating executable in /Users/lirum/Envs/temp-bhSkAFEf/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/lirum/Envs/temp-bhSkAFEf
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (ca72e7)!
Installing dependencies from Pipfile.lock (ca72e7)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell
JohnathMacBook3:temp lirum$ pipenv install psycopg2
Installing psycopg2…
Collecting psycopg2
  Using cached https://files.pythonhosted.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462/psycopg2-2.7.4.tar.gz
Skipping bdist_wheel for psycopg2, due to binaries being disabled for it.
Installing collected packages: psycopg2
  Running setup.py install for psycopg2: started
    Running setup.py install for psycopg2: finished with status 'done'
Successfully installed psycopg2-2.7.4

Adding psycopg2 to Pipfile's [packages]…
Pipfile.lock (ca72e7) out of date, updating to (3c2775)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (3c2775)!
Installing dependencies from Pipfile.lock (3c2775)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:01
To activate this project's virtualenv, run the following:
 $ pipenv shell
JohnathMacBook3:temp lirum$ pipenv --version
pipenv, version 2018.05.18
JohnathMacBook3:temp lirum$ 
1reaction
Quidgecommented, Jun 12, 2018

@OrangeDog , no, I don’t think I have tried that yet (I believe my version was downloaded before 5/18). I had tried PIP_NO_BINARY in the past, to the same result as sobolevn. I’m not at my machine right now, but does PIP_NO_BINARY=:<specific_package>: work for you? I need it on a package by package basis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage of Pipenv - Read the Docs
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . There are some known issues with using...
Read more >
pipenv Documentation
If pipenv isn't available in your shell after installation, you'll need to add the user base's binary directory to your PATH.
Read more >
Making pip installs a little less slow - Python⇒Speed
Installing packages with pip, Poetry, and Pipenv can be slow. Learn how to ensure it's not even slower, and a potential speed-up.
Read more >
pipenv-to-requirements - PyPI
pipenv is a great tool to maintain Pipfile, but developers might be stuck with backward compatibility issues for tools and services that still...
Read more >
Could not build wheels for _ which use PEP 517 and cannot ...
Sometimes this can be due to a cache issue and the no-binary flag won't work. In which case try pip install <insert package...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found