Pip Install not installing into correct directory?

前端 未结 10 1105
小蘑菇
小蘑菇 2020-11-29 04:22

I can\'t seem to use sudo pip install correctly so that it installs into the following directory:

/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth         


        
10条回答
  •  醉话见心
    2020-11-29 04:35

    You could just change the shebang line. I do this all the time on new systems.

    If you want pip to install to a current version of Python installed just update the shebang line to the correct version of pythons path.

    For example, to change pip (not pip3) to install to Python 3:

    #!/usr/bin/python
    

    To:

    #!/usr/bin/python3
    

    Any module you install using pip should install to Python not Python.

    Or you could just change the path.

提交回复
热议问题