Why isn't pip updating my numpy and scipy?

后端 未结 3 628
既然无缘
既然无缘 2021-02-07 21:43

My problem is that pip won\'t update my Python Packages, even though there are no errors.

It is similar to this one, but I am still now sure what to do. Basically, ALL

3条回答
  •  臣服心动
    2021-02-07 22:25

    Old question, but I found it when trying to solve this issue, will post my solution.

    I found @abarnert's diagnosis to be correct and helpful, but I don't like any of the solutions: I really want to upgrade the default version of numpy. The challenge is that the directory these guys are in (which @abarnert mentioned) cannot be touched even by sudo, as they are in this "wheel" group. In fact, if you go there and do sudo rm -rf blah, it will give you a permission denied error.

    To get around this, we have to take drastic action:

    1. Reboot the computer in recovery mode
    2. Find the terminal and type csrutil disable
    3. Reboot normally, then upgrade numpy with pip2 install --user --upgrade numpy (and same for any other packages that have this problem)
    4. Repeat steps a and b, this time changing "disable" to "enable"

    Note: "csrutil disable" is serious business that can destabilize your machine, I would use it only when absolutely necessary and re-enable it ASAP. But AFAIK it's the only way to upgrade Python packages in a wheel directory.

提交回复
热议问题