Pipenv: Command Not Found

后端 未结 6 468
Happy的楠姐
Happy的楠姐 2020-12-22 16:12

I\'m new to Python development and attempting to use pipenv. I ran the command pip install pipenv, which ran successfully:

...
Successfully buil         


        
6条回答
  •  青春惊慌失措
    2020-12-22 16:23

    OSX GUYS, OVER HERE!!!

    As @charlax answered (for me the best one), you can use a more dynamic command to set PATH, buuut for mac users this could not work, sometimes your USER_BASE path got from site is wrong, so you need to find out where your python installation is.

    $ which python3
    /usr/local/bin/python3.6
    

    you'll get a symlink, then you need to find the source's symlink.

    $ ls -la /usr/local/bin/python3.6
      lrwxr-xr-x  1 root  wheel  71 Mar 14 17:56 /usr/local/bin/python3.6 -> ../../../Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
    

    (this ../../../ means root)

    So you found the python path (/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6), then you just need to put in you ~/.bashrc as follows:

    export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.6/bin"

提交回复
热议问题