pip missing from Python venv

孤街浪徒 提交于 2019-12-24 12:00:46

问题


When I create a new virtualenv using python3.5, it creates the virtualenv using Python 3.5.2 as expected, but is missing pip:

jpmelos@jpmelos-laptop:~$ pi<TAB COMPLETION>
pi1toppm         pilconvert       pinentry         ping6
pi3topbm         pildriver        pinentry-curses  pinky
pic              pilfile          pinentry-gnome3  pip3.6
piconv           pilfont          pinentry-x11     pivot_root
pidof            pilprint         ping             pixeltool
jpmelos@jpmelos-laptop:~$ python3.5 -m venv myvenv
jpmelos@jpmelos-laptop:~$ source myvenv/bin/activate
(myvenv) jpmelos@jpmelos-laptop:~$ pi<TAB COMPLETION>
pi1toppm         pilconvert       pinentry         ping6
pi3topbm         pildriver        pinentry-curses  pinky
pic              pilfile          pinentry-gnome3  pip3.6
piconv           pilfont          pinentry-x11     pivot_root
pidof            pilprint         ping             pixeltool
(myvenv) jpmelos@jpmelos-laptop:~$ python
Python 3.5.2 (default, Dec 28 2016, 10:08:00)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
(myvenv) jpmelos@jpmelos-laptop:~$

What is going on? Shouldn't there be a pip binary?


回答1:


Remove .pydistutils.cfg file in your home directory.

rm ~/.pydistutils.cfg

This is nicely explained in this.



来源:https://stackoverflow.com/questions/43426275/pip-missing-from-python-venv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!