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.

Only pipenv shell -c works on my zsh

See original GitHub issue

I’m using zsh, and pip shell only works with the --compat flag.

So, in this case, what “misconfigured shells” means?

github-douglas/demo/dfu-demo
▶ pipenv shell --help                                     
Usage: pipenv shell [OPTIONS] [SHELL_ARGS]...

  Spawns a shell within the virtualenv.

Options:
  --three / --two  Use Python 3/2 when creating virtualenv.
  --python TEXT    Specify which version of Python virtualenv should use.
  -c, --compat     Run in shell compatibility mode (for misconfigured shells).
  --help           Show this message and exit.

github-douglas/demo/dfu-demo
▶ pipenv shell       
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.

github-douglas/demo/dfu-demo
▶ ./manage.py --version
Traceback (most recent call last):
  File "./manage.py", line 17, in <module>
    "Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

github-douglas/demo/dfu-demo
▶ pipenv shell -c                                         
Spawning environment shell (/bin/zsh).
source /Users/douglas/.virtualenvs/dfu-demo/bin/activate

github-douglas/demo/dfu-demo
▶ source /Users/douglas/.virtualenvs/dfu-demo/bin/activate
(dfu-demo) 
github-douglas/demo/dfu-demo
▶ ./manage.py --version                                   
1.10.5
(dfu-demo) 
github-douglas/demo/dfu-demo
▶ 

pipenv==3.3.4

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
frgtncommented, Feb 25, 2017

@kennethreitz could you expand a little (or post a link) on what is considered properly configured shell in this case? For people who stumble to this via Google. Thanks!

10reactions
kennethreitzcommented, Feb 2, 2017

that means you don’t have your shell configured properly!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
Run the following command: pipenv lock --clear. and try again. If this does not work, try manually deleting the whole cache directory.
Read more >
How to add pipenv to the PATH in my .zshrc - Stack Overflow
Installing pipenv with a package manager rather than pip adds it directly to $PATH of any shell, like bash or zsh. sudo apt...
Read more >
Issues installing pipenv as terminal can't open .bash_profile ...
When i try echo $SHELL in the terminal, the result is /bin/zsh , so zsh does appear to be the default shell. The...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Starting in release 2022.3.23 all packages are mapped only to a single package ... Pipenv will expand environment variables (if defined) in your...
Read more >
pipenv Documentation - Read the Docs
They work together. ... shell will spawn a shell with the virtualenv activated. ... Originally pipenv supported only two package groups: packages and ......
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