Using sudo with pip3?

Clint Moyer contact at clintmoyer.com
Sat Jan 7 21:07:55 EST 2017


I would lightly advise against, assuming both Pip and your package
manager are trying to accomplish nearly the same thing. Stick with
updating through the repo.

If you find that the version your OS provides is out-of-date compared
to what's on PyPi or Github, then you might want to remove from your
OS and re-install through Pip, for those discrete cases. That's the
platform agnostic route.
--
Clint


On Sat, Jan 7, 2017 at 6:45 PM, jim <jf_byrnes at comcast.net> wrote:
> On 01/07/2017 05:58 PM, Clint Moyer wrote:
>>
>> Not sure how you guys got this thread so far off topic, but I think it
>> is valuable to present the current situation in the context of Jim's
>> sudo question. Staying on topic, the emphasis should be on taking the
>> path of least resistance with your current OS. The only thing to be
>> gleaned from PEP394 is that users should not put faith or expectations
>> in what their /usr/bin/python symlink points to. Most systems point to
>> Python2, but it is not guaranteed.
>>
>> So to minimize your issues with installing Python packages, take the
>> path of least resistance and install through your system repo. And use
>> Python2 or Python3 explicitly to avoid conflicts.
>>
>> --
>> Clint
>>
>
> As I mentioned in another post, most of the more popular modules I had
> installed on my old system using pip are available in the repository and I
> will use the repository to install them on the new system. I now understand
> that using sudo is a bad idea.
>
> One question from the earlier post that did not get answered concerned
> upgrading a repository installed module with pip. To get started on the new
> system I installed pip3 from the repository. The first time I used it to
> install a module it said a newer version was available and gave the command
> to update it. What are the consequences of using pip to upgrade repository
> installed modules?
>
> I ask because 16.04 is LTS and won't be getting version upgrades unless they
> are security related. Also pandas is in the repositories but the module
> pandas-datareader, which I may need to use, is not.
>
> Regards,  Jim
>
>
>>
>> On Sat, Jan 7, 2017 at 4:39 PM, Chris Angelico <rosuav at gmail.com> wrote:
>>>
>>> On Sun, Jan 8, 2017 at 9:34 AM, Michael Torrie <torriem at gmail.com> wrote:
>>>>
>>>> On 01/07/2017 11:39 AM, Clint Moyer wrote:
>>>>>
>>>>> All Linux operating systems come with Python installed, with more
>>>>> recent systems such as Arch defaulting /usr/bin/python to Python3,
>>>>> since Python2 discontinued some 7-9 years ago.
>>>>
>>>>
>>>> Poor choice of words, in my opinion.  Python 2 has not received new
>>>> features for 7-9 years now but it certainly hasn't been "discontinued"
>>>> and won't be for some years yet, though new programming (and distros)
>>>> should be with Python 3 now.
>>>
>>>
>>> Also, /usr/bin/python shouldn't be Python 3.
>>>
>>> https://www.python.org/dev/peps/pep-0394/
>>>
>>> But various distros are moving towards "don't have Python 2 installed
>>> by default", which consequently means "no system scripts depend on
>>> Python 2".
>>>
>>> ChrisA
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list