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.

usage about Pipfile.lock on multiple paltforms(window, linux, macos)

See original GitHub issue

I have a ython application runs on multiple paltforms(window, linux, macos). I only wanna to manage one Pipfile and add it to git control.

but the Pipfile.lock generated by pipenv install may be different on different platforms. So it seems that Pipfile.lock should not be controlled by git!

for example: Pipfile content:

url = ""
verify_ssl = true
name = "pypi"

pyinstaller = {version = "*",markers = """python_version >= '2.7' and python_version != '3.0'and python_version != '3.1' and python_version != '3.2' and python_version != '3.3'"""}


python_version = "3.6"

use pipenv graph insight into my dependency.

pipenv graph

dependency on Windows:

  - altgraph [required: Any, installed: 0.16.1]
  - macholib [required: >=1.8, installed: 1.11]
    - altgraph [required: >=0.15, installed: 0.16.1]
  - pefile [required: >=2017.8.1, installed: 2019.4.14]
    - future [required: Any, installed: 0.17.1]
  - pywin32-ctypes [required: Any, installed: 0.2.0]
  - setuptools [required: Any, installed: 40.8.0]

dependency on linux:

  - altgraph [required: Any, installed: 0.16.1]
  - macholib [required: >=1.8, installed: 1.11]
    - altgraph [required: >=0.15, installed: 0.16.1]
  - pefile [required: >=2017.8.1, installed: 2019.4.14]
    - future [required: Any, installed: 0.17.1]
  - setuptools [required: Any, installed: 41.0.0]

So the Pipfile.locks on windows and linux are different. How could i solve it?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

leileigongcommented, Apr 18, 2019

can pipenv generate different Pipfile.lock with specified file name? such as Pipfile_win.lock for windows paltform, Pipfile_mac.lock for macos paltform.

frostmingcommented, Apr 17, 2019

True, I am also facing this problem which is annoying. The only way to work is to write the missing packages to Pipfile with system markers.

The problem is the resolver can’t know all dependencies when the resolution is performed on a particular platform, which makes the whole environment only reproducible on the same platform. I will mark it as an enhancement for future.

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 >
Cross-platform Pipenv.lock - python - Stack Overflow
Currently, I know that pipenv generates different lock files for ipython, between Windows and Linux (and probably also different for macOS/ ...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look ... On Linux and macOS you can find the user...
Read more >
Pipenv: A Guide to the New Python Packaging Tool
Example Usage; Pipenv's Dependency Resolution Approach; The Pipfile ... The lock file enables deterministic builds by taking a snapshot of all the versions ......
Read more >
Configure a Pipenv environment | IntelliJ IDEA Documentation
Pipenv also generates the Pipfile.lock file, which is used to produce deterministic builds and create a snapshot of your working environment.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found