6上使用Brew安装Pipenv

6上使用Brew安装Pipenv

本文介绍了在Python 3.6上使用Brew安装Pipenv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照此处中的建议使用Homebrew安装pipenv. a>.

I am trying to install pipenv using Homebrew as suggested in here.

首先,我运行了$ brew install pipenv.然后,brew自动安装python 3.7,我可以正确使用pipenv.但是,我想在Python 3.6上使用pipenv,所以我运行$ brew switch python 3.7 3.6.5,然后在尝试$ pipenv install时出现错误,如下所示:

First, I ran $ brew install pipenv. Then, brew install python 3.7 automatically and I can use pipenv properly. But, I want to use pipenv on Python 3.6, so I ran $ brew switch python 3.7 3.6.5 and then when I tried $ pipenv install an error appeared as follow:

dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/pipenv/2018.11.26/libexec/bin/python3.7
  Reason: image not found
Abort trap: 6

有什么解决方案可以与Python 3.6.5一起安装pipenv?

Is there any solution to install pipenv along with Python 3.6.5?

谢谢.

推荐答案

我遇到了同样的问题,并花了很长时间进行研究.最后,我确定我的项目并非绝对需要python3.6,所以我将brew切换为python3.7并重新安装了pipenv.

I had the same issue and spent a long time researching. In the end I determined my project did not absolutely need python3.6 so I switched brew to python3.7 and reinstalled pipenv.

如果您绝对需要将pipenvpython3.6结合使用,则可能会找到此线程很有帮助,但对我来说,这似乎是我不想经历的核选择.

If you absolutely need to use pipenv with python3.6 then you may find this thread helpful but to me it seemed like a nuclear option I didn't want to go through.

如何重新使用pipenvpython3.7:

# get your version of python3.7
brew list --versions python

# switch to your python3.7 version
brew switch python 3.7.x_x

# install pipenv if it was removed during the troubleshooting process
brew install pipenv

# pipenv should work now
pipenv --help

这篇关于在Python 3.6上使用Brew安装Pipenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:53