Recommended way of installing python packages on Arch

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
27
down vote

favorite
12












What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip?



I started off by installing stuff from pacman and the AUR and don't know if it would be wise to mix with pip packages.










share|improve this question















migrated from serverfault.com May 19 '13 at 19:12


This question came from our site for system and network administrators.


















    up vote
    27
    down vote

    favorite
    12












    What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip?



    I started off by installing stuff from pacman and the AUR and don't know if it would be wise to mix with pip packages.










    share|improve this question















    migrated from serverfault.com May 19 '13 at 19:12


    This question came from our site for system and network administrators.
















      up vote
      27
      down vote

      favorite
      12









      up vote
      27
      down vote

      favorite
      12






      12





      What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip?



      I started off by installing stuff from pacman and the AUR and don't know if it would be wise to mix with pip packages.










      share|improve this question















      What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip?



      I started off by installing stuff from pacman and the AUR and don't know if it would be wise to mix with pip packages.







      arch-linux python pacman pip






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 3 '16 at 21:43









      Jeff Schaller

      35.6k952118




      35.6k952118










      asked May 19 '13 at 13:10









      Nils Werner

      1,44521013




      1,44521013




      migrated from serverfault.com May 19 '13 at 19:12


      This question came from our site for system and network administrators.






      migrated from serverfault.com May 19 '13 at 19:12


      This question came from our site for system and network administrators.






















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          27
          down vote



          accepted










          If you don't need the python packages for all users then you can install them in your home like this:



          pip install --user packagename


          Installing in your home will not conflict with the package manager.



          By default pip install --user will install in your "user site" directory. Usually that is something like: /home/lesmana/.local/lib/python3.6/site-packages.



          The following command will print, among others, your "user site" location:



          python -m site


          To customize the install location:



          PYTHONUSERBASE=$HOME/some/dir pip install --user packagename


          this will install everything under $HOME/some/dir



          to run:



          PYTHONUSERBASE=$HOME/some/dir $HOME/some/dir/bin/progname


          See the pip manual for more information.






          share|improve this answer






















          • IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
            – ttsiodras
            Jul 18 '16 at 9:05







          • 1




            Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
            – Hendy
            Jan 14 '17 at 17:06

















          up vote
          7
          down vote













          Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.



          Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.






          share|improve this answer
















          • 1




            You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
            – Tobias Kienzler
            Oct 12 '15 at 16:55










          • I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
            – Al.G.
            Aug 22 '17 at 22:14


















          up vote
          4
          down vote













          For certain packages (ones that I most probably don't want to hack), I make my own package using this:



          https://github.com/bluepeppers/pip2arch



          then build and install the PKGBUILD produced.



          I leave virtualenvs for packages I might want to modify or hack.






          share|improve this answer




















          • There is also github.com/wenLiangcan/pip2pkgbuild
            – Tobias Kienzler
            Feb 14 '17 at 10:07

















          up vote
          2
          down vote













          The right way for ArchLinux



          The right way to install PYTHON packages in ArchLinux is using PACMAN! To install packages to Python3 you have to use



          sudo pacman -S python-'package'


          If you want to install packages from Python2, you have to use



          sudo pacman -S python2-'package'


          Most python packages are in the ArchLinux repositories and the packages that are not are in AUR (ArchLinux User Repositories) - for these packages you have to download the PKGBUILD file and compile. After that, you have to use PACMAN to finish the installation



          makepkg -s
          sudo pacman -U 'compiled-package'


          The second right way for ArchLinux



          When the package isn't in the AUR or the PKGBUILD isn't working, you can use PIP to install it to Python3



          sudo pip install 'python-package'


          or Python2



          sudo pip2 install 'python-package'


          You could give a chance to virtualenv or even conda



          On Arch you can also use VirtualEnvironments. This can bring portability to your code and maintain old packages as well. Install it with



          sudo pacman -S python-virtualenv


          and try this



          virtualenv -p /usr/bin/python3 yourenv
          source yourenv/bin/activate
          pip install package-name


          When you create this environment yourenv, you will setup pip to install packages only into this environment, not to the entire system.



          These other links can be useful with you want to learn more about managing packages on Linux with conda or virtualenv:



          Installing Python Packages from a Jupyter Notebook



          Code Python on ArchLinux



          If you follow these rules, your ArchLinux will not break and won't have dependency problems between PACMAN and PIP.



          Hope it's useful!






          share|improve this answer





























            up vote
            1
            down vote













            In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.



            https://wiki.archlinux.org/index.php/Python_VirtualEnv



            Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.






            share|improve this answer






















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f76389%2frecommended-way-of-installing-python-packages-on-arch%23new-answer', 'question_page');

              );

              Post as a guest






























              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              27
              down vote



              accepted










              If you don't need the python packages for all users then you can install them in your home like this:



              pip install --user packagename


              Installing in your home will not conflict with the package manager.



              By default pip install --user will install in your "user site" directory. Usually that is something like: /home/lesmana/.local/lib/python3.6/site-packages.



              The following command will print, among others, your "user site" location:



              python -m site


              To customize the install location:



              PYTHONUSERBASE=$HOME/some/dir pip install --user packagename


              this will install everything under $HOME/some/dir



              to run:



              PYTHONUSERBASE=$HOME/some/dir $HOME/some/dir/bin/progname


              See the pip manual for more information.






              share|improve this answer






















              • IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
                – ttsiodras
                Jul 18 '16 at 9:05







              • 1




                Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
                – Hendy
                Jan 14 '17 at 17:06














              up vote
              27
              down vote



              accepted










              If you don't need the python packages for all users then you can install them in your home like this:



              pip install --user packagename


              Installing in your home will not conflict with the package manager.



              By default pip install --user will install in your "user site" directory. Usually that is something like: /home/lesmana/.local/lib/python3.6/site-packages.



              The following command will print, among others, your "user site" location:



              python -m site


              To customize the install location:



              PYTHONUSERBASE=$HOME/some/dir pip install --user packagename


              this will install everything under $HOME/some/dir



              to run:



              PYTHONUSERBASE=$HOME/some/dir $HOME/some/dir/bin/progname


              See the pip manual for more information.






              share|improve this answer






















              • IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
                – ttsiodras
                Jul 18 '16 at 9:05







              • 1




                Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
                – Hendy
                Jan 14 '17 at 17:06












              up vote
              27
              down vote



              accepted







              up vote
              27
              down vote



              accepted






              If you don't need the python packages for all users then you can install them in your home like this:



              pip install --user packagename


              Installing in your home will not conflict with the package manager.



              By default pip install --user will install in your "user site" directory. Usually that is something like: /home/lesmana/.local/lib/python3.6/site-packages.



              The following command will print, among others, your "user site" location:



              python -m site


              To customize the install location:



              PYTHONUSERBASE=$HOME/some/dir pip install --user packagename


              this will install everything under $HOME/some/dir



              to run:



              PYTHONUSERBASE=$HOME/some/dir $HOME/some/dir/bin/progname


              See the pip manual for more information.






              share|improve this answer














              If you don't need the python packages for all users then you can install them in your home like this:



              pip install --user packagename


              Installing in your home will not conflict with the package manager.



              By default pip install --user will install in your "user site" directory. Usually that is something like: /home/lesmana/.local/lib/python3.6/site-packages.



              The following command will print, among others, your "user site" location:



              python -m site


              To customize the install location:



              PYTHONUSERBASE=$HOME/some/dir pip install --user packagename


              this will install everything under $HOME/some/dir



              to run:



              PYTHONUSERBASE=$HOME/some/dir $HOME/some/dir/bin/progname


              See the pip manual for more information.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 7 '17 at 15:58

























              answered May 20 '13 at 0:07









              lesmana

              14k105572




              14k105572











              • IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
                – ttsiodras
                Jul 18 '16 at 9:05







              • 1




                Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
                – Hendy
                Jan 14 '17 at 17:06
















              • IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
                – ttsiodras
                Jul 18 '16 at 9:05







              • 1




                Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
                – Hendy
                Jan 14 '17 at 17:06















              IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
              – ttsiodras
              Jul 18 '16 at 9:05





              IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer.
              – ttsiodras
              Jul 18 '16 at 9:05





              1




              1




              Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
              – Hendy
              Jan 14 '17 at 17:06




              Ugh. Newer to python and wish I'd known this before sudio pip-ping things. Thanks for this.
              – Hendy
              Jan 14 '17 at 17:06












              up vote
              7
              down vote













              Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.



              Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.






              share|improve this answer
















              • 1




                You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
                – Tobias Kienzler
                Oct 12 '15 at 16:55










              • I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
                – Al.G.
                Aug 22 '17 at 22:14















              up vote
              7
              down vote













              Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.



              Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.






              share|improve this answer
















              • 1




                You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
                – Tobias Kienzler
                Oct 12 '15 at 16:55










              • I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
                – Al.G.
                Aug 22 '17 at 22:14













              up vote
              7
              down vote










              up vote
              7
              down vote









              Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.



              Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.






              share|improve this answer












              Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.



              Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered May 19 '13 at 17:24









              Falcon Momot

              665510




              665510







              • 1




                You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
                – Tobias Kienzler
                Oct 12 '15 at 16:55










              • I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
                – Al.G.
                Aug 22 '17 at 22:14













              • 1




                You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
                – Tobias Kienzler
                Oct 12 '15 at 16:55










              • I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
                – Al.G.
                Aug 22 '17 at 22:14








              1




              1




              You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
              – Tobias Kienzler
              Oct 12 '15 at 16:55




              You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies
              – Tobias Kienzler
              Oct 12 '15 at 16:55












              I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
              – Al.G.
              Aug 22 '17 at 22:14





              I just got such errors, too. I had upgraded all pip3 packages and then pacman refused to do system upgrade due to conflicts. I had to uninstall that package both through pip3 and pacman, then do the system upgrade, and finally install the package back (using pacman, of course).
              – Al.G.
              Aug 22 '17 at 22:14











              up vote
              4
              down vote













              For certain packages (ones that I most probably don't want to hack), I make my own package using this:



              https://github.com/bluepeppers/pip2arch



              then build and install the PKGBUILD produced.



              I leave virtualenvs for packages I might want to modify or hack.






              share|improve this answer




















              • There is also github.com/wenLiangcan/pip2pkgbuild
                – Tobias Kienzler
                Feb 14 '17 at 10:07














              up vote
              4
              down vote













              For certain packages (ones that I most probably don't want to hack), I make my own package using this:



              https://github.com/bluepeppers/pip2arch



              then build and install the PKGBUILD produced.



              I leave virtualenvs for packages I might want to modify or hack.






              share|improve this answer




















              • There is also github.com/wenLiangcan/pip2pkgbuild
                – Tobias Kienzler
                Feb 14 '17 at 10:07












              up vote
              4
              down vote










              up vote
              4
              down vote









              For certain packages (ones that I most probably don't want to hack), I make my own package using this:



              https://github.com/bluepeppers/pip2arch



              then build and install the PKGBUILD produced.



              I leave virtualenvs for packages I might want to modify or hack.






              share|improve this answer












              For certain packages (ones that I most probably don't want to hack), I make my own package using this:



              https://github.com/bluepeppers/pip2arch



              then build and install the PKGBUILD produced.



              I leave virtualenvs for packages I might want to modify or hack.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 1 '15 at 2:40









              rmorgans

              411




              411











              • There is also github.com/wenLiangcan/pip2pkgbuild
                – Tobias Kienzler
                Feb 14 '17 at 10:07
















              • There is also github.com/wenLiangcan/pip2pkgbuild
                – Tobias Kienzler
                Feb 14 '17 at 10:07















              There is also github.com/wenLiangcan/pip2pkgbuild
              – Tobias Kienzler
              Feb 14 '17 at 10:07




              There is also github.com/wenLiangcan/pip2pkgbuild
              – Tobias Kienzler
              Feb 14 '17 at 10:07










              up vote
              2
              down vote













              The right way for ArchLinux



              The right way to install PYTHON packages in ArchLinux is using PACMAN! To install packages to Python3 you have to use



              sudo pacman -S python-'package'


              If you want to install packages from Python2, you have to use



              sudo pacman -S python2-'package'


              Most python packages are in the ArchLinux repositories and the packages that are not are in AUR (ArchLinux User Repositories) - for these packages you have to download the PKGBUILD file and compile. After that, you have to use PACMAN to finish the installation



              makepkg -s
              sudo pacman -U 'compiled-package'


              The second right way for ArchLinux



              When the package isn't in the AUR or the PKGBUILD isn't working, you can use PIP to install it to Python3



              sudo pip install 'python-package'


              or Python2



              sudo pip2 install 'python-package'


              You could give a chance to virtualenv or even conda



              On Arch you can also use VirtualEnvironments. This can bring portability to your code and maintain old packages as well. Install it with



              sudo pacman -S python-virtualenv


              and try this



              virtualenv -p /usr/bin/python3 yourenv
              source yourenv/bin/activate
              pip install package-name


              When you create this environment yourenv, you will setup pip to install packages only into this environment, not to the entire system.



              These other links can be useful with you want to learn more about managing packages on Linux with conda or virtualenv:



              Installing Python Packages from a Jupyter Notebook



              Code Python on ArchLinux



              If you follow these rules, your ArchLinux will not break and won't have dependency problems between PACMAN and PIP.



              Hope it's useful!






              share|improve this answer


























                up vote
                2
                down vote













                The right way for ArchLinux



                The right way to install PYTHON packages in ArchLinux is using PACMAN! To install packages to Python3 you have to use



                sudo pacman -S python-'package'


                If you want to install packages from Python2, you have to use



                sudo pacman -S python2-'package'


                Most python packages are in the ArchLinux repositories and the packages that are not are in AUR (ArchLinux User Repositories) - for these packages you have to download the PKGBUILD file and compile. After that, you have to use PACMAN to finish the installation



                makepkg -s
                sudo pacman -U 'compiled-package'


                The second right way for ArchLinux



                When the package isn't in the AUR or the PKGBUILD isn't working, you can use PIP to install it to Python3



                sudo pip install 'python-package'


                or Python2



                sudo pip2 install 'python-package'


                You could give a chance to virtualenv or even conda



                On Arch you can also use VirtualEnvironments. This can bring portability to your code and maintain old packages as well. Install it with



                sudo pacman -S python-virtualenv


                and try this



                virtualenv -p /usr/bin/python3 yourenv
                source yourenv/bin/activate
                pip install package-name


                When you create this environment yourenv, you will setup pip to install packages only into this environment, not to the entire system.



                These other links can be useful with you want to learn more about managing packages on Linux with conda or virtualenv:



                Installing Python Packages from a Jupyter Notebook



                Code Python on ArchLinux



                If you follow these rules, your ArchLinux will not break and won't have dependency problems between PACMAN and PIP.



                Hope it's useful!






                share|improve this answer
























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  The right way for ArchLinux



                  The right way to install PYTHON packages in ArchLinux is using PACMAN! To install packages to Python3 you have to use



                  sudo pacman -S python-'package'


                  If you want to install packages from Python2, you have to use



                  sudo pacman -S python2-'package'


                  Most python packages are in the ArchLinux repositories and the packages that are not are in AUR (ArchLinux User Repositories) - for these packages you have to download the PKGBUILD file and compile. After that, you have to use PACMAN to finish the installation



                  makepkg -s
                  sudo pacman -U 'compiled-package'


                  The second right way for ArchLinux



                  When the package isn't in the AUR or the PKGBUILD isn't working, you can use PIP to install it to Python3



                  sudo pip install 'python-package'


                  or Python2



                  sudo pip2 install 'python-package'


                  You could give a chance to virtualenv or even conda



                  On Arch you can also use VirtualEnvironments. This can bring portability to your code and maintain old packages as well. Install it with



                  sudo pacman -S python-virtualenv


                  and try this



                  virtualenv -p /usr/bin/python3 yourenv
                  source yourenv/bin/activate
                  pip install package-name


                  When you create this environment yourenv, you will setup pip to install packages only into this environment, not to the entire system.



                  These other links can be useful with you want to learn more about managing packages on Linux with conda or virtualenv:



                  Installing Python Packages from a Jupyter Notebook



                  Code Python on ArchLinux



                  If you follow these rules, your ArchLinux will not break and won't have dependency problems between PACMAN and PIP.



                  Hope it's useful!






                  share|improve this answer














                  The right way for ArchLinux



                  The right way to install PYTHON packages in ArchLinux is using PACMAN! To install packages to Python3 you have to use



                  sudo pacman -S python-'package'


                  If you want to install packages from Python2, you have to use



                  sudo pacman -S python2-'package'


                  Most python packages are in the ArchLinux repositories and the packages that are not are in AUR (ArchLinux User Repositories) - for these packages you have to download the PKGBUILD file and compile. After that, you have to use PACMAN to finish the installation



                  makepkg -s
                  sudo pacman -U 'compiled-package'


                  The second right way for ArchLinux



                  When the package isn't in the AUR or the PKGBUILD isn't working, you can use PIP to install it to Python3



                  sudo pip install 'python-package'


                  or Python2



                  sudo pip2 install 'python-package'


                  You could give a chance to virtualenv or even conda



                  On Arch you can also use VirtualEnvironments. This can bring portability to your code and maintain old packages as well. Install it with



                  sudo pacman -S python-virtualenv


                  and try this



                  virtualenv -p /usr/bin/python3 yourenv
                  source yourenv/bin/activate
                  pip install package-name


                  When you create this environment yourenv, you will setup pip to install packages only into this environment, not to the entire system.



                  These other links can be useful with you want to learn more about managing packages on Linux with conda or virtualenv:



                  Installing Python Packages from a Jupyter Notebook



                  Code Python on ArchLinux



                  If you follow these rules, your ArchLinux will not break and won't have dependency problems between PACMAN and PIP.



                  Hope it's useful!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 11 mins ago









                  Jeinzi

                  31




                  31










                  answered May 9 at 14:26









                  Emanuel Fontelles

                  294




                  294




















                      up vote
                      1
                      down vote













                      In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.



                      https://wiki.archlinux.org/index.php/Python_VirtualEnv



                      Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.






                      share|improve this answer


























                        up vote
                        1
                        down vote













                        In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.



                        https://wiki.archlinux.org/index.php/Python_VirtualEnv



                        Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.






                        share|improve this answer
























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.



                          https://wiki.archlinux.org/index.php/Python_VirtualEnv



                          Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.






                          share|improve this answer














                          In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.



                          https://wiki.archlinux.org/index.php/Python_VirtualEnv



                          Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jun 25 '14 at 10:40

























                          answered Jun 24 '14 at 2:11









                          bobbaluba

                          1514




                          1514



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f76389%2frecommended-way-of-installing-python-packages-on-arch%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay