Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm currently working on a simple Python script and using pipenv to manage dependencies.

Here's the problem:

When running pipenv shell and then python script.py, I'm getting module not found errors for things that are definitely in Pipfile (e.g. requests).

Here's what's interesting: I don't get these problems when I use pipenv run python script.py and I don't get these problems when I use bash instead of zsh, i.e. when I do:

bash
pipenv shell 
python script.py

the script runs happily and resolves the imports. I tried re-installing pipenv using Homebrew, but zsh still doesn't correctly activate my pipenv environment. Any ideas on how to get pipenv to work with zsh or why this would even be problematic?

Using zsh:

zsh

Using bash:

bash


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
4.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...