Conda setuptools install changes shebangs to default python install

后端 未结 1 1052
悲哀的现实
悲哀的现实 2021-01-22 18:20

I\'m having an issue where packages installed via setuptools to python anaconda have shebangs rewritten to the wrong location.

I have installed python anaconda and setup

1条回答
  •  伪装坚强ぢ
    2021-01-22 19:09

    I finally figured out what has been causing all my issues getting python and dependencies properly installed:

    Whenever sudo is invoked before an executable, in Debian the $PATH variable is automatically changed to a secure path lookup. Here is a demonstration:

    grant@DevBox2:/opt/content-analysis$ sudo sh
    # echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    

    versus

    grant@DevBox2:/opt/content-analysis$ sh
    $ echo $PATH
    /opt/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    

    So, when sudo is invoked prior to sudo python setup.py the install is reverting back to the default python.

    See this post for discussion

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