You are not logged in.
From https://docs.python.org/3/installing/ you can read:
pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.
pyvenv is the standard tool for creating virtual environments, and has been part of Python since Python 3.3.
In fact, pyvenv is owned by python:
$ pacman -Qo `which pyvenv`
/usr/bin/pyvenv is owned by python 3.4.2-2The pip command, though, has its own package:
$ pacman -Qo `which pip3`
/usr/bin/pip3 is owned by python-pip 6.0.7-1Why is that?
Last edited by wil93 (2015-02-02 19:30:05)
Offline
What about pip for python 2.x. Maybe that package would still be needed for that case but yes: For 3.4 it would not be needed anymore. I think this case will change within a given time.
Offline
I am not sure I understand the problem. pyenv is indeed the preferred method to create virtual environment and will include pip in the virtual environment. pip is used to install python packages directly from python. It may not be a very good idea to install python packages directly without a virtual environment, because it will conflicts with archlinux package and you risk to break everything if you upgrade python. Anyway some people may want to do that for some reason, this is why pip is packaged.
Offline
...
In fact, pyvenv is owned by python:
...
The pip command, though, has its own package:
...
Why is that?
pip is included with the official binary installers, it is not part of the python source code.
pyvenv is part of the python source code.
arch does not use an official binary, but compiles it from source, so you have one package for python (including venv) and another package for pip.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I am not sure I understand the problem. pyenv is indeed the preferred method to create virtual environment and will include pip in the virtual environment. pip is used to install python packages directly from python. It may not be a very good idea to install python packages directly without a virtual environment, because it will conflicts with archlinux package and you risk to break everything if you upgrade python. Anyway some people may want to do that for some reason, this is why pip is packaged.
Whether you use a virtual environment or not, you still have to issue a "pip install package" command. To do this, currently, you must install the python-pip package. Here we can read:
Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default [1], so you may have pip already.
so I'm just wondering why the default python package doesn't include pip.
arch does not use an official binary, but compiles it from source, so you have one package for python (including venv) and another package for pip.
Thanks, in that case: wouldn't it be suitable to update the python package changing the python-pip dependency from "optional" to "required"? I think it would be suitable, but it wouldn't be a "beautiful" soultion.
Ruby, for example, provides its own package manager:
$ pacman -Qo `which gem`
/usr/bin/gem is owned by ruby 2.2.0-1Same story for Nodejs:
$ pacman -Qo `which npm`
/usr/bin/npm is owned by nodejs 0.10.36-2I wonder: will pip eventually become part of python's source code?
Offline
Thanks, in that case: wouldn't it be suitable to update the python package changing the python-pip dependency from "optional" to "required"? I think it would be suitable, but it wouldn't be a "beautiful" soultion.
What? No. Please don't. For me, python is required for the following: namcap pyalpm python-pyelftools ranger reflector. All of these are just fine without pip. I have no use for pip.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I have no use for pip.
That's not the point... Going by that logic we should split up "gem" from ruby and "npm" from nodejs. When python didn't have an official package manager we used (unofficially) pip. Now it is official, so it should be present by default.
Also, I don't think that adding 5,66 MiB to the current 87,41 MiB will hurt ![]()
Last edited by wil93 (2015-02-02 13:07:09)
Offline
Merging pip/setuptools into the python package seems to have been considered when 3.4 came out [1], but in the end they were kept as separate packages. I'd suggest contacting the maintainer for more background.
Offline
Also, I don't think that adding 5,66 MiB to the current 87,41 MiB will hurt
No, and this is a good argument for including it in the python package. But if they remain separate packages, I see no need for it to be a hard dependency. Python runs just fine without pip. Hard dependencies should be actually required, not just optional bits that some users would use.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hard dependencies should be actually required, not just optional bits that some users would use.
Whilst you can argue a simplicity/upstream made the change argument, I support @Trilby's argument from my experience of playing around with PKGBUILDs.
Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository
Offline
Whether you use a virtual environment or not, you still have to issue a "pip install package" command. To do this, currently, you must install the python-pip package. Here we can read:
When you setup the virtualenv, virtualenv will download and install pip automatically in the virtual environment, so I think you don't need the python-pip package.
Last edited by olive (2015-02-02 16:23:51)
Offline
When you setup the virtualenv, virtualenv will download and install pip automatically in the virtual environment, so I think you don't need the python-pip package.
Thanks, I didn't know that (I assumed that pyvenv copied pip from its system folder).
Actually, I investigated a bit, and pyvenv will not download it (from internet) but will just "unpack it" ![]()
This is the "packed" wheel file, and it's (correctly) owned by the python package ![]()
$ pacman -Qo /usr/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl
/usr/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl is owned by python 3.4.2-2(setuptools is also included, in the same system folder).
So, to sum up the discussion, pip is actually included in the python package ![]()
Still, sometimes it would be useful to have it also outside virtual environments, but for most use-cases this is just enough. Thanks @olive, and thanks everyone ![]()
EDIT: I don't have enough characters available to mark this topic as "[SOLVED]", can some moderator handle this? ![]()
Last edited by wil93 (2015-02-02 18:30:53)
Offline
EDIT: I don't have enough characters available to mark this topic as "[SOLVED]", can some moderator handle this?
Edit your first post and abbreviate the subject to use less characters, then mak it as [SOLVED]
Last edited by olive (2015-02-02 19:11:14)
Offline
So, to sum up the discussion, pip is actually included in the python package
Still, sometimes it would be useful to have it also outside virtual environments, but for most use-cases this is just enough. Thanks @olive, and thanks everyone
The official python response is that users should not really be using pip outside of a virtual env anyhow as you should not install into the global packages. So python 3.4 installs pip in a virtual env under <env>/bin/pip (i.e. by pyvenv - the new virtualenv command) but does not include a /usr/bin/pip.
If you really want to use official python 3.4 pip globally you don't have to install python-pip anyhow, you can just type "python -m pip <pip-commands ..>". Alias that command to pip if you want.
Last edited by bulletmark (2015-02-02 22:20:02)
Offline
If you really want to use official python 3.4 pip globally you don't have to install python-pip anyhow, you can just type "python -m pip <pip-commands ..>". Alias that command to pip if you want.
Uhm, but since pip it's not installed (it's only "present" as a .whl file in the system directory) that should not work. In fact:
$ python -m pip
/usr/bin/python: No module named pipI'd say that python-pip is the only way to use pip globally.
Offline
I don't have python-pip installed, but python -m pip works for me?
Edit: in fact, the official python 3.4 docs say to use "python -m pip". See https://docs.python.org/3/installing/.
Last edited by bulletmark (2015-02-02 22:49:11)
Offline
I don't have python-pip installed, but python -m pip works for me?
That's weird... for me, that command works only if python-pip is installed. I am testing with both python2-pip and python-pip uninstalled and it doesn't work.
EDIT: You probably have this folder hanging around (not belonging to a package) for some reason: /usr/lib/python3.4/site-packages/pip-6.0.7-py3.4.egg-info (maybe with different version numbers). Could you try issuing this command?
$ pacman -Qo /usr/lib/python3.4/site-packages/pip-6.0.7-py3.4.egg-infoon my system (when the folder exists) it's owned by python-pip.
Last edited by wil93 (2015-02-02 23:06:46)
Offline
I don't have python-pip installed, but python -m pip works for me?
Edit: in fact, the official python 3.4 docs say to use "python -m pip". See https://docs.python.org/3/installing/.
Sure, but take a look at the PKGBUILD, pip (and setuptools) are explicitly disabled in Arch's python package:
https://projects.archlinux.org/svntogit … python#n48
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online