Installing specific package versions with pip

0 votes

I'm trying to install version 1.2.2 of the MySQL_python adaptor, using a fresh virtualenv created with the --no-site-packages option. The current version shown in PyPi is 1.2.3. Is there a way to install the older version? I found an article stating that this should do it:

pip install MySQL_python==1.2.2

When installed, however, it still shows MySQL_python-1.2.3-py2.6.egg-info in the site packages. Is this a problem specific to this package, or am I doing something wrong?

Nov 22, 2020 in Python by Roshni
• 10,480 points
998 views

1 answer to this question.

0 votes

TL;DR:

  • pip install -Iv (i.e. pip install -Iv MySQL_python==1.2.2)

First, I see two issues with what you're trying to do. Since you already have an installed version, you should either uninstall the current existing driver or use pip install -I MySQL_python==1.2.2

However, you'll soon find out that this doesn't work. If you look at pip's installation log, or if you do a pip install -Iv MySQL_python==1.2.2 you'll find that the PyPI URL link does not work for MySQL_python v1.2.2.

The download link 404s and the fallback URL links are re-directing infinitely due to sourceforge.net's recent upgrade and PyPI's stale URL.

So to properly install the driver, you can follow these steps:

pip uninstall MySQL_python
pip install -Iv http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL
answered Nov 22, 2020 by Gitika
• 65,770 points

Related Questions In Python

0 votes
1 answer

How to find which version of package is installed with pip?

As of pip 1.3, there is a pip show command. $ ...READ MORE

answered Dec 4, 2020 in Python by Gitika
• 65,770 points
5,085 views
0 votes
11 answers
0 votes
1 answer

Installing package not found in conda

You can install pip in your conda env and then run pip ...READ MORE

answered Jul 31, 2019 in Python by SDeb
• 13,300 points
3,796 views
0 votes
3 answers

i am installing wordcloud using pip but i am unable to do that ....i am getting the following error

word cloud is not supported for python ...READ MORE

answered Apr 15, 2020 in Python by anonymous
33,146 views
0 votes
1 answer

Installing PIL with pip

Install Xcode and Xcode Command Line Tools ...READ MORE

answered Sep 11, 2020 in Python by FogleBird
4,860 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,460 views
0 votes
1 answer

Python and pip, list all versions of a package that's available?

The script at Pastebin does work. However, ...READ MORE

answered Nov 22, 2020 in Python by Gitika
• 65,770 points
5,289 views
0 votes
1 answer

How to uninstall a package installed with pip install --user?

Having tested this using Python 3.5 and ...READ MORE

answered Dec 4, 2020 in Python by Gitika
• 65,770 points
17,658 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP