Combine --user with --prefix error with setup.py install

后端 未结 5 1514
余生分开走
余生分开走 2020-11-30 18:53

I was trying to install Python packages a system I recently gained access to. I was trying to take advantage of Python\'s relatively new per user site-packages directory, an

5条回答
  •  既然无缘
    2020-11-30 19:46

    As has been noted in the comments, the accepted answer (by @gotgenes, who, presumably, has genes) can lead to unexpected consequences.

    @rogeleaderr says, "Note that keeping this file like this will make Python think that / is your root python library directory, leading to confusing issues if you try to install other new packages."

    Rather than write a new config file, as @gotgenes recommends, a better option is to add --prefix= (with no text to the right of the equals sign) as an option on the command line, as in

    $ python setup.py install --user --prefix=
    

提交回复
热议问题