Skip to content

Instantly share code, notes, and snippets.

@larrycai
Created July 25, 2013 07:56
Show Gist options
  • Select an option

  • Save larrycai/6077673 to your computer and use it in GitHub Desktop.

Select an option

Save larrycai/6077673 to your computer and use it in GitHub Desktop.
can't upgrade python package in ubuntu 12.10 using pip 1.3.1 and pip 1.4 has error in list

Try to use pip to install python packages like vcrpy in standard ubuntu 12.10

it seems there is problem to upgrade using pip 1.3.1

see log below

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"

# apt-get install python-pip
# pip --version
pip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

The pip is too old, therefore I want to upgrade the pip to latest stable version, so I use pip command itself, is it now allowed ??

# pip install --upgrade pip
# pip --version # pip is changed to /usr/local/bin
pip 1.4 from /usr/local/lib/python2.7/dist-packages (python 2.7)

Just notice the pip is updated to 1.4 as stable

# pip list
python-debian (0.1.21-nmu2ubuntu1)
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/list.py", line 127, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/list.py", line 136, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/local/lib/python2.7/dist-packages/pip/util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 194, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError    

Then switch back to pip 1.3.1

# pip install --upgrade pip==1.3.1
# pip --version

# pip install vcrpy==0.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment