[python-uk] easy_install pip won't work, am concerned Ministry of Packaging may chase after me.

Ed Stafford walter.stafford at carbonsixty.co.uk
Tue Mar 30 23:14:50 CEST 2010


Mike,

Glad it worked for you. Although the Ubuntu team does a fine job of package
management I'm still a bit hesitant to use their python packages. It's easy
enough using vanilla python to get everything you need going. In the future
you can do the following just as easily.

`wget http://peak.telecommunity.com/dist/ez_setup.py`
`sudo python ez_setup.py`
`sudo easy_install pip virtualenv virtualenvwrapper`

Then continue on your way using virtual environments and pip.

Cheers,
-Ed

On 30 March 2010 21:38, Mike MacCana <mike.maccana at gmail.com> wrote:

> Walter, you are a god amongst men.
>
> It turns out this is a bug in Ubuntu 10.4's virtualenv package. See
> https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/517390
>
> But your advice has successfully worked around it.
>
> For anyone else wanting a quick method to get pip + virtualenv running on
> Ubuntu 10,4, here's what I did to get things working:
>
> 1. aptitude install python-virtualenv and python-setuptools packages
> 2. easy_install pip
> 3. easy_install virtualenv-wrapper
> 4. mkvirtualenv <project>
> 5. pip -E <project> install <python module>
>
> Mike
>
> On Tue, Mar 30, 2010 at 9:19 PM, Ed Stafford <
> walter.stafford at carbonsixty.co.uk> wrote:
>
>> Hi Mike,
>>
>> You should really use easy_install to install pip under your main python
>> site-packages along with virtualenv/virtualenvwrapper and then use PIP after
>> you mkvirtualenv. PIP is aware of virtual environments so you shouldn't have
>> any trouble in this regard.
>>
>> Basically, install PIP in your global (main) site-packages, not your
>> virtual environment.
>>
>> Another nice lib to use is yolk, which you can use to spit out what and
>> where various python packages are installed.
>>
>> Hope this helps.
>>
>> Cheers,
>> -Ed
>>
>> On 30 March 2010 21:12, Mike MacCana <mike.maccana at gmail.com> wrote:
>>
>>> Hey UK Pythonistas,
>>>
>>> In accordance with the new directives issed at
>>> http://s3.pixane.com/python_comrades.png, I've installed virtualenv and
>>> virtualenv_wrapper, made, and activated a project like so:
>>>
>>> # mkvirtualenv imeveryone
>>> # workon imeveryone
>>>
>>> However using the easy_install inside the virtualenv to install pip
>>> doesn't seem to be working. But easy_install inside the virtualenv does
>>> successfully install other packages (eg, I tried installing ipython and it
>>> was fine).
>>>
>>> Am I doing something wrong? I'm not really experienced with the various
>>> Python packaging tools.
>>>
>>> [Note the system is Ubuntu 10.04 beta, but I don't think that's the cause
>>> of the prob]
>>>
>>> Full output is below.
>>>
>>> Thanks for your help, much appreciated,
>>>
>>> Mike
>>>
>>> (imeveryone)root at mike-desktop:~# easy_install pip
>>> /root/.virtualenvs/imeveryone/bin/easy_install:5: UserWarning: Module
>>> pkg_resources was already imported from
>>> /root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py,
>>> but /usr/lib/python2.6/dist-packages is being added to sys.path
>>>   from pkg_resources import load_entry_point
>>> /root/.virtualenvs/imeveryone/bin/easy_install:5: UserWarning: Module
>>> site was already imported from
>>> /root/.virtualenvs/imeveryone/lib/python2.6/site.pyc, but
>>> /usr/lib/python2.6/dist-packages is being added to sys.path
>>>   from pkg_resources import load_entry_point
>>> Searching for pip
>>> Reading http://pypi.python.org/simple/pip/
>>> Reading http://pip.openplans.org
>>> Best match: pip 0.6.3
>>> Downloading
>>> http://pypi.python.org/packages/source/p/pip/pip-0.6.3.tar.gz#md5=0602fa9179cfaa98e41565d4a581d98c
>>> Processing pip-0.6.3.tar.gz
>>> Running pip-0.6.3/setup.py -q bdist_egg --dist-dir
>>> /tmp/easy_install-bgHiZO/pip-0.6.3/egg-dist-tmp-9OS3pv
>>> Traceback (most recent call last):
>>>   File "/root/.virtualenvs/imeveryone/bin/easy_install", line 8, in
>>> <module>
>>>     load_entry_point('setuptools==0.6c9', 'console_scripts',
>>> 'easy_install')()
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 1671, in main
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 1659, in with_ei_usage
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 1675, in <lambda>
>>>
>>>   File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
>>>     dist.run_commands()
>>>   File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
>>>     self.run_command(cmd)
>>>   File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
>>>     cmd_obj.run()
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 211, in run
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 446, in easy_install
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 476, in install_item
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 655, in install_eggs
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 930, in build_and_install
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
>>> line 919, in run_setup
>>>
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py",
>>> line 27, in run_setup
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py",
>>> line 63, in run
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/sandbox.py",
>>> line 29, in <lambda>
>>>   File "setup.py", line 48, in <module>
>>>   File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
>>>     _setup_distribution = dist = klass(attrs)
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py",
>>> line 223, in __init__
>>>   File "/usr/lib/python2.6/distutils/dist.py", line 270, in __init__
>>>     self.finalize_options()
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py",
>>> line 256, in finalize_options
>>>   File
>>> "/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py",
>>> line 1918, in load
>>>     while parts and parts[-1]=='00000000':
>>> ImportError: <module 'setuptools.dist' from
>>> '/root/.virtualenvs/imeveryone/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py'>
>>> has no 'check_packages' attribute
>>>
>>>
>>> _______________________________________________
>>> python-uk mailing list
>>> python-uk at python.org
>>> http://mail.python.org/mailman/listinfo/python-uk
>>>
>>>
>>
>> _______________________________________________
>> python-uk mailing list
>> python-uk at python.org
>> http://mail.python.org/mailman/listinfo/python-uk
>>
>>
>
> _______________________________________________
> python-uk mailing list
> python-uk at python.org
> http://mail.python.org/mailman/listinfo/python-uk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-uk/attachments/20100330/b9fb9515/attachment-0001.html>


More information about the python-uk mailing list