在ipython中导入这个并在没有pip的情况下神奇地使用它!正确的版本!
pip_magic的Python项目详细描述
使用ipython简化pip
$ipython2In[1]:importpip_magicIn[2]:pipinstallpip_magic--upgrade['pip_magic','--upgrade']Youareusingpipversion7.0.1,howeverversion7.0.3isavailable.Youshouldconsiderupgradingviathe'pip install --upgrade pip'command.Collectingpip-magicDownloadingpip_magic-0.2.1-py2.py3-none-any.whlInstallingcollectedpackages:pip-magicFoundexistinginstallation:pip-magic0.2Uninstallingpip-magic-0.2:Successfullyuninstalledpip-magic-0.2Successfullyinstalledpip-magic-0.2.1In[3]:## so recursive !
为什么?
见this twitter thread, 该软件包预先确定了此线程的日期,但它是一个很好的示例:
安德烈亚斯穆勒
Is there a good succinct guide to how to figure out which Python environment you’re in and how to install stuff in the right environment that’s suitable for beginners? cc @jakevdp (also if there’s not Jake, can you write one ;)
我:
pip_magic: pypi.python.org/pypi/pip_magic use pip from within IPython/Notebook and it install in same env you’re in.
上午:
That looks great, but also lacks a write-up explaining the problem ;)
我:
Can I embed your tweet in the readme ?
上午:
Lol sure. Though it does expose me as the naysayer that I am ;) (and my tendency to complain on Twitter but not do anything productive lol)