Showing posts with label pip. Show all posts
Showing posts with label pip. Show all posts

Monday, December 28, 2015

pip freeze - unknown revision or path not in the working tre

While trying to get the list of the current package using pip freeze, it throws following error -

> pip freeze
Complete output from command /usr/bin/git rev-parse (detachedfrom0af02a9):
fatal: ambiguous argument '(detachedfrom0af02a9)': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:

'git [...] -- [...]'

(detachedfrom0af02a9)

----------------------------------------
Command /usr/bin/git rev-parse (detachedfrom0af02a9) failed with error code 128

Storing complete log in /home/youraccount/.pip/pip.log

It's issue with the outdated pip package. To fix the issue -

You can upgrade it with following command -

pip install --upgrade pip

It should fix the issue.

Sunday, January 12, 2014

Error on upgrading setuptools using pip

Today I upgraded pip using below command as for some reason some of the package it was not able to find and throwing strange error that its not able to find the requested package -

pip install --upgrade pip

Existing installation was 1.0.2 and it installed the 1.5

After the upgrade, it started throwing following error on requesting any install

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /Users/Jaimin/.pip/pip.log

What it means is my pip install 1.0.2 had old setup tools and after upgrading to 1.5 it needs newer version of setup tools.

Js-MacBook-Pro:dj16 J$ pip install --upgrade setuptools
Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /Users/Jaimin/.pip/pip.log

So it still throws the error on upgrade of setuptools, you need to use following command to upgrade -

pip install setuptools --no-use-wheel --upgrade

It will be able to upgrade the setuptools and pip should work fine after this.

Thursday, May 2, 2013

Downgrade the pip installed package



While installing something on my local for my application I run into problem where it replaced (overwrote) one the of the package which wasn’t compatible with other applications I was using. So basically I was dependent on two applications which were dependent on another third party application but not of the same version.

Of coures, I was not ready for that upgrade, so I had to downgrade the version manually for that package, I am sure people run into similar problem often. 

Here are the steps I followed -

In this case Django 1.5 was installed, so it removed my existing Django 1.4.5 and installed 1.5

To downgrade and again go back to Dajngo 1.4.5, you need to locate the egg file for Django which normally you can find it in your vritual env path -

//lib/python2.7/site-packages/Django-1.5.1-py2.7.egg-info

Delete this file, and install 1.4.5 manually with following command -

pip install django==1.4.5

You can follow the same instruction for any other package.