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

List information about pip's environment when installing. #3166

Open
Ivoz opened this issue Oct 6, 2015 · 11 comments
Open

List information about pip's environment when installing. #3166

Ivoz opened this issue Oct 6, 2015 · 11 comments
Labels
resolution: deferred till PR Further discussion will happen when a PR is made type: enhancement Improvements to functionality

Comments

@Ivoz
Copy link
Contributor

Ivoz commented Oct 6, 2015

Currently when running pip install <pkg> we get no information about how we are installing a package. For example:

$ pip install --user calldules
Collecting calldules
Installing collected packages: calldules
Successfully installed calldules

I think it would be extremely useful to list some of this information so we know what's happening. Such as version of pip, version of python, where is pip, where is package being installed, what version of the package was installed. For example:

$ pip install --user calldules
Using pip 7.1.2 from /usr/lib/python3.5/site-packages (python 3.5)
Install location: /home/ivo/.local/lib/python3.5/site-packages/
Collecting calldules
Installing collected packages: calldules (1.0.1)
Successfully installed calldules

Now I know that I used the right python, the right pip, I installed to a good location, and what version of the package I installed.

It might be helpful to provide more information for other commands as well. uninstall, for instance, already tells you the exact location of the package files you're uninstalling, so I know I'm getting rid of the right thing. pip list, however, doesn't tell me anything about where the packages are located.

@Ivoz Ivoz changed the title List information about the installing environment when installing. List information about pip's environment when installing. Oct 6, 2015
@xavfernandez xavfernandez added the type: enhancement Improvements to functionality label Oct 9, 2015
@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

This issue looks reasonable, however if/when it gets implemented we want to make sure not to add a bunch of extra output by default. We've done a lot of work at reducing the noise of a pip install and we don't want to regress on that front. Perhaps adding most/all of this behind a -v flag or limiting it to just which Python we're installing to by default.

@chrahunt chrahunt added the resolution: deferred till PR Further discussion will happen when a PR is made label Sep 15, 2019
@chrahunt
Copy link
Member

Something like the version and pip location at least would be very useful - we get a lot of issues with just the pip install output and getting these details would cut down on the followup questions needed to understand the situation.

I've marked this as "deferred to PR" assuming that whoever implements will make a decision and we can weigh the pros/cons at that point. Personally I don't think having the pip -V-equivalent output as the first line would be very controversial.

@gutsytechster
Copy link
Contributor

Where should this information go? I mean when I look into install command's run method, I see that the logging information has been put into the functions which are doing some specific operation.
Since this is a general info. while running install command, should this be added within the run method directly?

The code for install command is a bit overwhelming for me. So, not exactly able to deduct this part.

@uranusjr
Copy link
Member

Implementation-wise, the simplest choice would be to add the install location to the top of install_given_deps, either by changing to current Installing collected packages log or on its own. This may not be the most user-friendly option, but is the easiest to both implement and maintain.

@gutsytechster
Copy link
Contributor

I see, thanks for the pointer.

@gutsytechster
Copy link
Contributor

If we keep it at the position you pointed to. It'd be shown at the bottom of the logs i.e. after collecting all the packages. Won't it help to keep it at the top as also suggested by the OP?

I was thinking of putting it here - https://github.com/pypa/pip/blob/master/src/pip/_internal/operations/prepare.py#L388.

Let me know what do you think about it.

@uranusjr
Copy link
Member

That’s why I said the solution is not the most user-friendly. But other solutions would introduce additional maintenance overhead, since you don’t need to know where about those information otherwise. There is a trade-off.

@gutsytechster
Copy link
Contributor

I was wondering if it'd be more helpful if we provide the message regarding the install location at the end as Successfully installed <package> at <install_location>. I would definitely want others to chime in and give their suggestions.

@McSinyx
Copy link
Contributor

McSinyx commented May 20, 2020

When it's installed successfully, I believe that we can get such information from pip show. About the original issue, I think one additional use case apart from knowing the success case is when it fail, for debugging.

@uranusjr
Copy link
Member

uranusjr commented May 20, 2020

Yeah, the scenario this info would be most useful is when the installation fails (or would have, but the user has a chance to ctrl-C when they see the wrong location).

@gutsytechster
Copy link
Contributor

I see, yeah that makes more sense. I'd go with keeping the install location at the starting of logs.

bors bot referenced this issue in duckinator/emanate Jul 30, 2020
153: Update pip to 20.2 r=duckinator a=pyup-bot


This PR updates [pip](https://pypi.org/project/pip) from **20.1.1** to **20.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 20.2
   ```
   =================

Deprecations and Removals
-------------------------

- Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory. (`6998 &lt;https://github.com/pypa/pip/issues/6998&gt;`_, `8617 &lt;https://github.com/pypa/pip/issues/8617&gt;`_)
- Disallow passing install-location-related arguments in ``--install-options``. (`7309 &lt;https://github.com/pypa/pip/issues/7309&gt;`_)
- Add deprecation warning for invalid requirements format &quot;base&gt;=1.0[extra]&quot; (`8288 &lt;https://github.com/pypa/pip/issues/8288&gt;`_)
- Deprecate legacy setup.py install when building a wheel failed for source
  distributions without pyproject.toml (`8368 &lt;https://github.com/pypa/pip/issues/8368&gt;`_)
- Deprecate -b/--build/--build-dir/--build-directory. Its current behaviour is confusing
  and breaks in case different versions of the same distribution need to be built during
  the resolution process. Using the TMPDIR/TEMP/TMP environment variable, possibly
  combined with --no-clean covers known use cases. (`8372 &lt;https://github.com/pypa/pip/issues/8372&gt;`_)
- Remove undocumented and deprecated option ``--always-unzip`` (`8408 &lt;https://github.com/pypa/pip/issues/8408&gt;`_)

Features
--------

- Log debugging information about pip, in ``pip install --verbose``. (`3166 &lt;https://github.com/pypa/pip/issues/3166&gt;`_)
- Refine error messages to avoid showing Python tracebacks when an HTTP error occurs. (`5380 &lt;https://github.com/pypa/pip/issues/5380&gt;`_)
- Install wheel files directly instead of extracting them to a temp directory. (`6030 &lt;https://github.com/pypa/pip/issues/6030&gt;`_)
- Add a beta version of pip&#39;s next-generation dependency resolver.

  Move pip&#39;s new resolver into beta, remove the
  ``--unstable-feature=resolver`` flag, and enable the
  ``--use-feature=2020-resolver`` flag. The new resolver is
  significantly stricter and more consistent when it receives
  incompatible instructions, and reduces support for certain kinds of
  :ref:`Constraints Files`, so some workarounds and workflows may
  break. More details about how to test and migrate, and how to report
  issues, at :ref:`Resolver changes 2020` . Maintainers are preparing to
   ```
   
  
  
   ### 20.2b1
   ```
   ===================

Bug Fixes
---------

- Correctly treat wheels containing non-ASCII file contents so they can be
  installed on Windows. (`5712 &lt;https://github.com/pypa/pip/issues/5712&gt;`_)
- Prompt the user for password if the keyring backend doesn&#39;t return one (`7998 &lt;https://github.com/pypa/pip/issues/7998&gt;`_)

Improved Documentation
----------------------

- Add GitHub issue template for reporting when the dependency resolver fails (`8207 &lt;https://github.com/pypa/pip/issues/8207&gt;`_)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pip
  - Changelog: https://pyup.io/changelogs/pip/
  - Homepage: https://pip.pypa.io/
</details>



Co-authored-by: pyup-bot <[email protected]>
bors bot referenced this issue in duckinator/emanate Jul 31, 2020
153: Update pip to 20.2 r=duckinator a=pyup-bot


This PR updates [pip](https://pypi.org/project/pip) from **20.1.1** to **20.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 20.2
   ```
   =================

Deprecations and Removals
-------------------------

- Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory. (`6998 &lt;https://github.com/pypa/pip/issues/6998&gt;`_, `8617 &lt;https://github.com/pypa/pip/issues/8617&gt;`_)
- Disallow passing install-location-related arguments in ``--install-options``. (`7309 &lt;https://github.com/pypa/pip/issues/7309&gt;`_)
- Add deprecation warning for invalid requirements format &quot;base&gt;=1.0[extra]&quot; (`8288 &lt;https://github.com/pypa/pip/issues/8288&gt;`_)
- Deprecate legacy setup.py install when building a wheel failed for source
  distributions without pyproject.toml (`8368 &lt;https://github.com/pypa/pip/issues/8368&gt;`_)
- Deprecate -b/--build/--build-dir/--build-directory. Its current behaviour is confusing
  and breaks in case different versions of the same distribution need to be built during
  the resolution process. Using the TMPDIR/TEMP/TMP environment variable, possibly
  combined with --no-clean covers known use cases. (`8372 &lt;https://github.com/pypa/pip/issues/8372&gt;`_)
- Remove undocumented and deprecated option ``--always-unzip`` (`8408 &lt;https://github.com/pypa/pip/issues/8408&gt;`_)

Features
--------

- Log debugging information about pip, in ``pip install --verbose``. (`3166 &lt;https://github.com/pypa/pip/issues/3166&gt;`_)
- Refine error messages to avoid showing Python tracebacks when an HTTP error occurs. (`5380 &lt;https://github.com/pypa/pip/issues/5380&gt;`_)
- Install wheel files directly instead of extracting them to a temp directory. (`6030 &lt;https://github.com/pypa/pip/issues/6030&gt;`_)
- Add a beta version of pip&#39;s next-generation dependency resolver.

  Move pip&#39;s new resolver into beta, remove the
  ``--unstable-feature=resolver`` flag, and enable the
  ``--use-feature=2020-resolver`` flag. The new resolver is
  significantly stricter and more consistent when it receives
  incompatible instructions, and reduces support for certain kinds of
  :ref:`Constraints Files`, so some workarounds and workflows may
  break. More details about how to test and migrate, and how to report
  issues, at :ref:`Resolver changes 2020` . Maintainers are preparing to
   ```
   
  
  
   ### 20.2b1
   ```
   ===================

Bug Fixes
---------

- Correctly treat wheels containing non-ASCII file contents so they can be
  installed on Windows. (`5712 &lt;https://github.com/pypa/pip/issues/5712&gt;`_)
- Prompt the user for password if the keyring backend doesn&#39;t return one (`7998 &lt;https://github.com/pypa/pip/issues/7998&gt;`_)

Improved Documentation
----------------------

- Add GitHub issue template for reporting when the dependency resolver fails (`8207 &lt;https://github.com/pypa/pip/issues/8207&gt;`_)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pip
  - Changelog: https://pyup.io/changelogs/pip/
  - Homepage: https://pip.pypa.io/
</details>



Co-authored-by: pyup-bot <[email protected]>
Co-authored-by: Ellen Marie Dash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: deferred till PR Further discussion will happen when a PR is made type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

7 participants