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

Warn if user executes !pip or !conda #12622

Closed
wants to merge 1 commit into from

Conversation

ashwinvis
Copy link
Contributor

Fixes #12204

@ashwinvis
Copy link
Contributor Author

Result:

In [6]: !pip -h
/home/avmo/src/sandbox/ipython/IPython/core/interactiveshell.py:2488: UserWarning: You executed the system command !pip which may not work as expected. Try the IPython magic %pip instead.
  warnings.warn(

Usage:   
  pip <command> [options]

...
In [7]: pip -h

Usage:   
  /home/avmo/src/sandbox/ipython/testpypi/bin/python -m pip <command> [options]

...
In [8]: %pip -h

Usage:   
  /home/avmo/src/sandbox/ipython/testpypi/bin/python -m pip <command> [options]

...

@ivanov
Copy link
Member

ivanov commented May 7, 2021

We got this commit in via #12954 , so I am going to close this PR. Thanks again, @ashwinvis !

@ivanov ivanov closed this May 7, 2021
@Carreau Carreau added this to the no action milestone Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest %pip or %conda when user types !pip or !conda
3 participants