Fixing PATH for Python libraries using Bash

前端 未结 2 1154
日久生厌
日久生厌 2020-12-30 03:47

I am attempting to install some Python libraries by executing variations of the following command in Bash:

pip install --user -U numpy

I inst

相关标签:
2条回答
  • 2020-12-30 04:08

    The error message is telling you to add Python 3 to your path.

    To do that, use a text editor to open /Users/<you>/.bashrc, and as the very last line add:

    export PATH=/Users/<you>/Library/Python/3.8/bin:$PATH
    

    Then you'll need to launch a new Terminal window for those settings to take effect. (you could make it take effect in your current shell by entering the line directly into your shell)

    0 讨论(0)
  • 2020-12-30 04:16

    Update: As of python 3.8, the following path should be used:

    export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin$PATH
    

    If you're using bash, you can store this in your /.bashrc
    If you're using zsh, you can store this in your /.zshrc

    0 讨论(0)
提交回复
热议问题