Search code examples
pythonpipenv

pipenv reference another python version


My python version is 3.6.5.

But if I entered pipenv, it throws error.

➜  akak pipenv
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/pipenv/2018.11.26_1/libexec/bin/python3.7
  Reason: image not found
[1]    1407 abort      pipenv

Maybe Referenced from is keypoint of error.

It refered python3.7, But my python version is 3.6.5.

Is there any solution here?

Thanks.

(I installed pipenv through pip install pipenv --user)


Solution

  • You can set the Python binary when you create a new pipenv project like this:

    pipenv --python 3.6.5
    

    This will force your version to be used.