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.

Conversion from requirements.txt to Pipfile fails

See original GitHub issue

Hi!

I have a Pipfile in the root of my project and then a folder (subproj) that contains a requirements.txt for a subproject. I’m doing the following:

$ cd myproj
$ pipenv shell
$ cd subproj

Then I’m trying to convert a requirements.txt into a Pipfile for this subproject, executing pipenv install -r requirements.txt and I get this error message:

Requirements file provided! Importing into Pipfile…
Traceback (most recent call last):
  File "/Users/joaoalves/.local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.0.6', 'console_scripts', 'pipenv')()
  File "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/joaoalves/.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 "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/cli.py", line 1680, in install
    import_requirements(r=requirements, dev=dev)
  File "/Users/joaoalves/.local/lib/python2.7/site-packages/pipenv/cli.py", line 232, in import_requirements
    assert os.path.isfile(r)
AssertionError

I’m not sure if this is a bug per se or if there is some problem in my environment. I can use virtualenv and virtualenvwrapper without any problem. Pipenv works fine too with the Pipfile that’s on the root project.

Environment:

  • Mac OS Sierra 10.12.6
  • ZSH + Oh My ZSH
  • Pyenv with Python 2.7

Best regards, João

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
kennethreitzcommented, Sep 27, 2017

Sorry for the bug! Thanks for noticing it 😃

2reactions
kennethreitzcommented, Sep 27, 2017

basically, this is currently from the root of the project, so,

pipenv install -r subdir/requirements.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

python pip trouble installing from requirements.txt
I keep getting errors like No distributions at all found for somepackage Storing debug log for failure in /root/.pip/pip.log
Read more >
Common Pipenv Errors and How to Solve Them
Be aware that the 'Installation Succeeded' alert is untrue; there is no Panadas to install. All that s occurred is the addition of...
Read more >
Pipenv: A Guide to the New Python Packaging Tool
How do I convert to a Pipfile? ... The typical solution to this problem is to use pip freeze . ... Pipfile intends...
Read more >
pip freeze - pip documentation v22.3.1
Generate a requirements file and then install from it in another environment. Unix/macOS. env1/bin/python -m pip freeze > requirements.txt env2/bin/ ...
Read more >
Snyk for Python
Snyk uses the built dependency tree to analyze the Pipfile . ... You can convert setup.py to requirements.txt by installing the packages into...
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