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.

Exception raised creating Pipfile.lock

See original GitHub issue

In a new project directory, I attempted to install errbot. It installs successfully, but pipenv loses the ability to create a Pipfile.lock - here’s the traceback:

 ~ > src > mkdir chatops
 ~ > src > cd chatops
 ~ > src > chatops > pipenv install --three errbot
Creating a virtualenv for this project…
Using /usr/local/bin/python3 to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/lyndsy.simon/.virtualenvs/chatops-HQdk3cG3/bin/python3.6
Also creating executable in /Users/lyndsy.simon/.virtualenvs/chatops-HQdk3cG3/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/lyndsy.simon/.virtualenvs/chatops-HQdk3cG3
Creating a Pipfile for this project…
Installing errbot…
Collecting errbot
Collecting rocket-errbot (from errbot)
Collecting colorlog (from errbot)
  Using cached colorlog-3.1.0-py2.py3-none-any.whl
Collecting markdown (from errbot)
Collecting requests (from errbot)
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting ansi (from errbot)
Collecting yapsy>=1.11 (from errbot)
Collecting jinja2 (from errbot)
  Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting Pygments>=2.0.2 (from errbot)
  Using cached Pygments-2.2.0-py2.py3-none-any.whl
Collecting webtest (from errbot)
  Using cached WebTest-2.0.28-py2.py3-none-any.whl
Collecting pygments-markdown-lexer>=0.1.0.dev39 (from errbot)
Collecting dnspython3 (from errbot)
Requirement already satisfied: setuptools in /Users/lyndsy.simon/.virtualenvs/chatops-HQdk3cG3/lib/python3.6/site-packages (from errbot)
Collecting daemonize (from errbot)
  Using cached daemonize-2.4.7-py2.py3-none-any.whl
Collecting bottle (from errbot)
Collecting pyOpenSSL (from errbot)
  Using cached pyOpenSSL-17.3.0-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->errbot)
  Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->errbot)
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->errbot)
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->errbot)
  Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->errbot)
Collecting six (from webtest->errbot)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting beautifulsoup4 (from webtest->errbot)
  Using cached beautifulsoup4-4.6.0-py3-none-any.whl
Collecting WebOb>=1.2 (from webtest->errbot)
  Using cached WebOb-1.7.3-py2.py3-none-any.whl
Collecting waitress>=0.8.5 (from webtest->errbot)
  Using cached waitress-1.0.2-py2.py3-none-any.whl
Collecting dnspython==1.15.0 (from dnspython3->errbot)
  Using cached dnspython-1.15.0-py2.py3-none-any.whl
Collecting cryptography>=1.9 (from pyOpenSSL->errbot)
  Using cached cryptography-2.0.3-cp36-cp36m-macosx_10_6_intel.whl
Collecting cffi>=1.7 (from cryptography>=1.9->pyOpenSSL->errbot)
  Using cached cffi-1.11.0-cp36-cp36m-macosx_10_6_intel.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.9->pyOpenSSL->errbot)
  Using cached asn1crypto-0.23.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7->cryptography>=1.9->pyOpenSSL->errbot)
Installing collected packages: rocket-errbot, colorlog, markdown, certifi, chardet, idna, urllib3, requests, ansi, yapsy, MarkupSafe, jinja2, Pygments, six, beautifulsoup4, WebOb, waitress, webtest, pygments-markdown-lexer, dnspython, dnspython3, daemonize, bottle, pycparser, cffi, asn1crypto, cryptography, pyOpenSSL, errbot
Successfully installed MarkupSafe-1.0 Pygments-2.2.0 WebOb-1.7.3 ansi-0.1.3 asn1crypto-0.23.0 beautifulsoup4-4.6.0 bottle-0.12.13 certifi-2017.7.27.1 cffi-1.11.0 chardet-3.0.4 colorlog-3.1.0 cryptography-2.0.3 daemonize-2.4.7 dnspython-1.15.0 dnspython3-1.15.0 errbot-5.1.2 idna-2.6 jinja2-2.9.6 markdown-2.6.9 pyOpenSSL-17.3.0 pycparser-2.18 pygments-markdown-lexer-0.1.0.dev39 requests-2.18.4 rocket-errbot-1.2.5 six-1.11.0 urllib3-1.22 waitress-1.0.2 webtest-2.0.28 yapsy-1.11.223

Adding errbot to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1800, in install
    do_lock(system=system, pre=pre)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1069, in do_lock
    pre=pre
  File "/usr/local/lib/python2.7/site-packages/pipenv/utils.py", line 425, in resolve_deps
    resolved_tree.update(resolver.resolve())
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
    self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 442, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/lz/f1mbw51x1qz1j4d83nvlzvg8gxr6jg/T/tmpVxNMzzbuild/errbot/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
lyndsysimoncommented, Sep 27, 2017

Upgraded, and I confirm the fix works. You have earned the usage of the “royal we”.

0reactions
nateprewittcommented, Oct 23, 2017

You had cached packages that were causing issues and the new fix wasn’t able to function as intended.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix locking failed in pipenv? - Stack Overflow
Just delete the Pipfile.lock then rerun pipenv lock .
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
☤ An exception is raised during Locking dependencies…​​ Run pipenv lock --clear and try again. The lock sequence caches results to speed up...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Locking Issue: Pipfile Contains a Reference to an Inexistent Package ... Pipfile won't lock when it tries to install packages that don't exist,...
Read more >
Pipenv: Python Dev Workflow for Humans — pipenv 2022.12 ...
It also generates the ever-important Pipfile.lock , which is used to produce deterministic builds. ... An exception is raised during Locking dependencies.
Read more >
Learn Python: Pipenv - Errors - Codecademy Forums
Pipfile.lock not found, creating… ... Installing dependencies from Pipfile.lock (456e4b)… ... InstallError]: raise exceptions.
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