Unable to upgrade python six package in mac osx 10.10.2

前端 未结 10 1937
情书的邮戳
情书的邮戳 2020-12-08 20:21

I am trying to install latest version of six python package but I have following issues. Can\'t get rid of six 1.4.1 in mac OSX 10.10.2

sudo pip install six          


        
相关标签:
10条回答
  • 2020-12-08 20:59

    I resolved the problem by the following method.

    1. Download the six-1.10.0.tar.gz package
    2. Use this command to install it.

    python setup.py install

    This works because it installs the new version of six to /Library/Python/2.7/site-packages/ which is searched before /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/

    0 讨论(0)
  • 2020-12-08 21:01

    I came across this exact issue when using pip to install the openstack client. My fix was to use easy_install instead of pip, as it utilizes /Library/Python/2.7/site-packages/ for module installation instead of the /System/Library/Frameworks/Python.framework/Versions/2.7/Extras. If this workaround is not an option for you, then I can confirm that @Masakazu Matsushita has the correct workaround of setting PYTHONPATH to /Library/Python/2.7/site-packages. To implement that workaround, add this line:

    export PYTHON_PATH=/Library/Python/2.7/site-packages
    

    to your ~/.bashrc and ~/.profile (if its a GUI Python application that you are trying to install).

    0 讨论(0)
  • 2020-12-08 21:04

    What worked for me was to use easy_install instead of pip.

    easy_install -U six
    

    Easy_install managed to upgrade the package even when pip failed.

    0 讨论(0)
  • 2020-12-08 21:04

    Try these steps

    1. Reinstall python using brew

      $ brew install python

    2. Resolve missing symlink problem

      $ brew link --overwrite python

    3. Reboot system or run

      $ hash -r python

    0 讨论(0)
  • 2020-12-08 21:11

    While one or another of the above solutions may work for you, I think it's important to understand what is going on and what are the options that you have. I found this (rather lengthy) description to be very useful: it starts with outlining the options and only then suggests solutions.

    0 讨论(0)
  • 2020-12-08 21:14

    For me, just using homebrew fixed everything.

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