Results 1 to 4 of 4

Thread: default install path for pip packages

  1. #1

    Default default install path for pip packages

    Hi all,
    I am new to openSUSE and have question about default install path for python pip packages.

    When I install pip packages by performing pip install xxx with root previledge, packages are installed under /usr, not /usr/local.
    For example, hg is installed to /usr/bin/hg by performing pip install mercurial
    This may cause file conflicts when installing same application via zypper, so I think it would be better that default install path for pip packages are different from packages provided by zypper.
    In several other distros such as Debian, default install path for pip packages is /usr/local .

    I understand that we can specify default install prefix by configureing /etc/pip.conf, but is there any special reason or background that openSUSE's pip installs packages under /usr ?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: default install path for pip packages

    Hi and welcome to the Forum
    Not sure why you want to use pip... many package are available for install esp in Tumbleweed else via the development repositories if you can't wait for it to appear in the main repository.
    Code:
    zypper if mercurial
    
    Repository     : Main Repository (OSS)   
    Name           : mercurial               
    Version        : 4.3.1-1.2
    Probably like sudo, openSUSE has a tendency to let the user decide and configure what they want to do...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: default install path for pip packages

    Thanks for the quick response!

    When installing apps that is not provided by zypper (such as conan), we will use pip, and pip installs not only sepecified app but also its dependencies. So I worried about the conflicts.

    It seems that per user installation (i.e. pip install --user xxx) is preffered..

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: default install path for pip packages

    I've never experienced a problem the relatively few times I've needed to install something from PyPi,
    But you're right that there is probably some possibility for problems.

    Recommend installing virtualenv,
    Then "pip" within a virtualenv if you want to be extra careful.

    Myself,
    I typically install my Dev projects into custom Dev environments in virtual machines to minimize conflicts and isolate what happens in Dev from any other active (especially other Dev environments).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •