Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip should be listed as a system requirement #1165

Closed
1 task done
lochsh opened this issue Jun 13, 2019 · 2 comments · Fixed by #2818
Closed
1 task done

pip should be listed as a system requirement #1165

lochsh opened this issue Jun 13, 2019 · 2 comments · Fixed by #2818
Labels
area/docs Documentation issues/improvements area/installer Related to the dependency installer

Comments

@lochsh
Copy link

lochsh commented Jun 13, 2019

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

My understanding is that pip is a system requirement for poetry. See my comment here of poetry failing to work without pip: #612 (comment)

The current system requirements only list Python as a system requirement. Although the need for pip might seem obvious given poetry installs Python packages, I believe it should be explicitly listed as a requirement.

Although many standard Python installations come with Pip, installing Python 2 from source does not (I think this has changed with Python 3). I don't think it should be assumed that a Python installation being present on a machine means a pip installation will be too. At least not until Python 2 is officially unsupported (I know it's not long! Using Python 2 was not my choice.).

Do let me know if I've misunderstood anything.

@kasteph kasteph assigned kasteph and unassigned kasteph Jun 19, 2019
@kasteph kasteph added area/docs Documentation issues/improvements area/installer Related to the dependency installer labels Jun 26, 2019
@abn
Copy link
Member

abn commented Aug 16, 2020

The only scenario where pip is externally managed is when Poetry is configured to use the system envrionment (poetry config virtualenvs.create false) and not create a project virtual environment.

In 1.0.z releases under Python 2.7 this pip is ensured by virtualenv and under Python 3 pip installation is ensured via ensurepip that is called by the venv built-in module. With 1.1.0 this becomes unified with the use of virutalenv and its embeded pip versions (#2666).

The custom installer can be used without issues in an environment that does not have pip. See below.

$ docker run --rm -it fedora:latest bash -c '\
>     type pip || :; \
>     type pip3 || :; \
>     python3 -m pip || :;\
>     curl -sLO https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py;\
>     python3 get-poetry.py --preview --yes; \
>     source $HOME/.poetry/env; \
>     poetry --version; \
>     poetry new foobar; \
>     pushd foobar; \
>     poetry install'
bash: line 1: type: pip: not found
bash: line 2: type: pip3: not found
/usr/bin/python3: No module named pip
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

$HOME/.poetry/bin

This path will then be added to your `PATH` environment variable by
modifying the profile files located at:

$HOME/.profile
$HOME/.bash_profile

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing version: 1.1.0b2
  - Downloading poetry-1.1.0b2-linux.tar.gz (57.18MB)

Poetry (1.1.0b2) is installed now. Great!

To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run `source $HOME/.poetry/env`

Poetry version 1.1.0b2
Created package foobar in foobar
/foobar /
Creating virtualenv foobar-lWDpn5M1-py3.8 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (1.8s)

Writing lock file

Package operations: 9 installs, 0 updates, 0 removals

  • Installing pyparsing (2.4.7)
  • Installing six (1.15.0)
  • Installing attrs (19.3.0)
  • Installing more-itertools (8.4.0)
  • Installing packaging (20.4)
  • Installing pluggy (0.13.1)
  • Installing py (1.9.0)
  • Installing wcwidth (0.2.5)
  • Installing pytest (5.4.3)

Installing the current project: foobar (0.1.0)

@abn abn closed this as completed in #2818 Sep 30, 2020
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements area/installer Related to the dependency installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants