Installing specific package versions with pip
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?
python mysql pip pypi mysql-python
add a comment |
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?
python mysql pip pypi mysql-python
10
Thanks for the hint, this worked for me to install an older version of openpyxl viapip install MySQL_python==1.8.9
– tim
Jun 9 '14 at 11:57
3
Yes, this also worked for pandas, thanks:pip install -Iv pandas==0.12.0
– tandy
Feb 12 '15 at 22:10
1
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53
add a comment |
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?
python mysql pip pypi mysql-python
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?
python mysql pip pypi mysql-python
python mysql pip pypi mysql-python
edited May 30 '17 at 5:47
Anthon
28.4k1693144
28.4k1693144
asked Mar 7 '11 at 22:58
Joe
7,52593135
7,52593135
10
Thanks for the hint, this worked for me to install an older version of openpyxl viapip install MySQL_python==1.8.9
– tim
Jun 9 '14 at 11:57
3
Yes, this also worked for pandas, thanks:pip install -Iv pandas==0.12.0
– tandy
Feb 12 '15 at 22:10
1
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53
add a comment |
10
Thanks for the hint, this worked for me to install an older version of openpyxl viapip install MySQL_python==1.8.9
– tim
Jun 9 '14 at 11:57
3
Yes, this also worked for pandas, thanks:pip install -Iv pandas==0.12.0
– tandy
Feb 12 '15 at 22:10
1
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53
10
10
Thanks for the hint, this worked for me to install an older version of openpyxl via
pip install MySQL_python==1.8.9– tim
Jun 9 '14 at 11:57
Thanks for the hint, this worked for me to install an older version of openpyxl via
pip install MySQL_python==1.8.9– tim
Jun 9 '14 at 11:57
3
3
Yes, this also worked for pandas, thanks:
pip install -Iv pandas==0.12.0– tandy
Feb 12 '15 at 22:10
Yes, this also worked for pandas, thanks:
pip install -Iv pandas==0.12.0– tandy
Feb 12 '15 at 22:10
1
1
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53
add a comment |
7 Answers
7
active
oldest
votes
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. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.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-python-1.2.2.tar.gz/download
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
|
show 1 more comment
You can even use a version range with pip install command. Something like this:
pip install 'stevedore>=1.3.0,<1.4.0'
And if the package is already installed and you want to downgrade it add --force-reinstall like this:
pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall
91
for example:$ pip install 'xkcdpass==1.2.5' --force-reinstall
– jschank
Jan 8 '16 at 18:10
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
|
show 1 more comment
One way as suggested in this post is to mention version in pip as
pip install -Iv MySQL_python==1.2.2
i.e. Use == and mention the version number to install only that version. -I, --ignore-installed ignores already installed packages.
add a comment |
I believe that if you already have a package it installed, pip will not overwrite it with another version. Use -I to ignore previous versions.
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the commandunset PYTHONPATHso to keeppipfrom seeing your pre-installed libraries
– user5359531
Sep 29 '17 at 15:16
add a comment |
To install a specific python package version whether it is the first time, an upgrade or a downgrade use:
pip install --force-reinstall MySQL_python==1.2.4
MySQL_python version 1.2.2 is not available so I used a different version. To view all available package versions from an index exclude the version:
pip install MySQL_python==
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
add a comment |
Since this appeared to be a breaking change introduced in version 10 of pip, I downgraded to a compatible version:
pip install 'pip<10'
This command tells pip to install a version of the module lower than version 10. Do this in a virutalenv so you don't screw up your site installation of Python.
add a comment |
There are 2 ways you may install any package with version:-
A). pip install -Iv package-name == version
B). pip install -v package-name == version
For A
Here, if you're using -I option while installing(when you don't know if the package is already installed) (like 'pip install -Iv pyreadline == 2.* 'or something), you would be installing a new separate package with the same existing package having some different version.
For B
- At first, you may want to check for no broken requirements.
pip check
2.and then see what's already installed by
pip list
3.if the list of the packages contain any package that you wish to install with specific version then the better option is to uninstall the package of this version first, by
pip uninstall package-name
4.And now you can go ahead to reinstall the same package with a specific version, by
pip install -v package-name==version
e.g. pip install -v pyreadline == 2.*
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f5226311%2finstalling-specific-package-versions-with-pip%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
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. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.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-python-1.2.2.tar.gz/download
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
|
show 1 more comment
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. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.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-python-1.2.2.tar.gz/download
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
|
show 1 more comment
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. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.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-python-1.2.2.tar.gz/download
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. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.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-python-1.2.2.tar.gz/download
edited Jul 25 '12 at 11:36
albertjan
6,11453462
6,11453462
answered Mar 7 '11 at 23:18
Mahmoud Abdelkader
13.4k33148
13.4k33148
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
|
show 1 more comment
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
1
1
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
There should be no problem with having multiple versions though, that's the point of creating new folders for every version and using .pth files.
– Jochen Ritzel
Mar 7 '11 at 23:26
3
3
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
This installs the correct version so is the answer to this question - thanks for your help. Hitting a different issue now: "error: command '/usr/bin/gcc-4.2' failed with exit status 1" while building '_mysql' extension. I know that I have GCC, and the install for MySQL_python 1.2.3 goes smoothly. Have others seen this issue, specifically with 1.2.2?
– Joe
Mar 8 '11 at 0:08
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
Make another question please and post the error message that you're getting from pip.
– Mahmoud Abdelkader
Mar 8 '11 at 0:10
2
2
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
Sure - here's the link: stackoverflow.com/questions/5226945/…
– Joe
Mar 8 '11 at 0:21
1
1
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
Curious why you use the -I option if we have already removed the existing installation - could you give some detail on that?
– Joe
Sep 11 at 9:37
|
show 1 more comment
You can even use a version range with pip install command. Something like this:
pip install 'stevedore>=1.3.0,<1.4.0'
And if the package is already installed and you want to downgrade it add --force-reinstall like this:
pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall
91
for example:$ pip install 'xkcdpass==1.2.5' --force-reinstall
– jschank
Jan 8 '16 at 18:10
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
|
show 1 more comment
You can even use a version range with pip install command. Something like this:
pip install 'stevedore>=1.3.0,<1.4.0'
And if the package is already installed and you want to downgrade it add --force-reinstall like this:
pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall
91
for example:$ pip install 'xkcdpass==1.2.5' --force-reinstall
– jschank
Jan 8 '16 at 18:10
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
|
show 1 more comment
You can even use a version range with pip install command. Something like this:
pip install 'stevedore>=1.3.0,<1.4.0'
And if the package is already installed and you want to downgrade it add --force-reinstall like this:
pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall
You can even use a version range with pip install command. Something like this:
pip install 'stevedore>=1.3.0,<1.4.0'
And if the package is already installed and you want to downgrade it add --force-reinstall like this:
pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall
edited Dec 18 at 17:31
Community♦
11
11
answered Nov 19 '15 at 19:42
user1978556
3,187173
3,187173
91
for example:$ pip install 'xkcdpass==1.2.5' --force-reinstall
– jschank
Jan 8 '16 at 18:10
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
|
show 1 more comment
91
for example:$ pip install 'xkcdpass==1.2.5' --force-reinstall
– jschank
Jan 8 '16 at 18:10
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
91
91
for example:
$ pip install 'xkcdpass==1.2.5' --force-reinstall– jschank
Jan 8 '16 at 18:10
for example:
$ pip install 'xkcdpass==1.2.5' --force-reinstall– jschank
Jan 8 '16 at 18:10
1
1
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
perfect! ran on Ubunto 15.04 and it (automatically) replaced an existing library with the specified version. Solved all my problems!
– goggelj
Feb 22 '16 at 14:27
1
1
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
Just going to mention that for Python 2 I had to use double quotes " instead of '
– Hand of C'thuhlu
Mar 6 '17 at 6:28
5
5
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
@HandofC'thuhlu i think we have to use double quotes for windows and not python 2
– SmartManoj
Mar 11 '17 at 10:46
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
Use double quotes on Windows: pip install "stevedore>=1.3.0,<1.4.0"
– jmng
Sep 17 at 13:40
|
show 1 more comment
One way as suggested in this post is to mention version in pip as
pip install -Iv MySQL_python==1.2.2
i.e. Use == and mention the version number to install only that version. -I, --ignore-installed ignores already installed packages.
add a comment |
One way as suggested in this post is to mention version in pip as
pip install -Iv MySQL_python==1.2.2
i.e. Use == and mention the version number to install only that version. -I, --ignore-installed ignores already installed packages.
add a comment |
One way as suggested in this post is to mention version in pip as
pip install -Iv MySQL_python==1.2.2
i.e. Use == and mention the version number to install only that version. -I, --ignore-installed ignores already installed packages.
One way as suggested in this post is to mention version in pip as
pip install -Iv MySQL_python==1.2.2
i.e. Use == and mention the version number to install only that version. -I, --ignore-installed ignores already installed packages.
edited May 23 '17 at 12:10
Community♦
11
11
answered Apr 4 '16 at 9:58
Srikar Appalaraju
48.6k44183244
48.6k44183244
add a comment |
add a comment |
I believe that if you already have a package it installed, pip will not overwrite it with another version. Use -I to ignore previous versions.
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the commandunset PYTHONPATHso to keeppipfrom seeing your pre-installed libraries
– user5359531
Sep 29 '17 at 15:16
add a comment |
I believe that if you already have a package it installed, pip will not overwrite it with another version. Use -I to ignore previous versions.
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the commandunset PYTHONPATHso to keeppipfrom seeing your pre-installed libraries
– user5359531
Sep 29 '17 at 15:16
add a comment |
I believe that if you already have a package it installed, pip will not overwrite it with another version. Use -I to ignore previous versions.
I believe that if you already have a package it installed, pip will not overwrite it with another version. Use -I to ignore previous versions.
answered Mar 7 '11 at 23:13
dappawit
8,05522424
8,05522424
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the commandunset PYTHONPATHso to keeppipfrom seeing your pre-installed libraries
– user5359531
Sep 29 '17 at 15:16
add a comment |
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the commandunset PYTHONPATHso to keeppipfrom seeing your pre-installed libraries
– user5359531
Sep 29 '17 at 15:16
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
I do not have it installed - using a fresh virtualenv created with the --no-site-packages option
– Joe
Mar 7 '11 at 23:14
2
2
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
okay, so you ask for version 1.2.2 and it still installs 1.2.3, and nothing else was installed? The syntax you used is correct for getting specific versions.
– dappawit
Mar 7 '11 at 23:15
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the command
unset PYTHONPATH so to keep pip from seeing your pre-installed libraries– user5359531
Sep 29 '17 at 15:16
"using a fresh virtualenv created with the --no-site-packages option"; you might need to preceed this with the command
unset PYTHONPATH so to keep pip from seeing your pre-installed libraries– user5359531
Sep 29 '17 at 15:16
add a comment |
To install a specific python package version whether it is the first time, an upgrade or a downgrade use:
pip install --force-reinstall MySQL_python==1.2.4
MySQL_python version 1.2.2 is not available so I used a different version. To view all available package versions from an index exclude the version:
pip install MySQL_python==
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
add a comment |
To install a specific python package version whether it is the first time, an upgrade or a downgrade use:
pip install --force-reinstall MySQL_python==1.2.4
MySQL_python version 1.2.2 is not available so I used a different version. To view all available package versions from an index exclude the version:
pip install MySQL_python==
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
add a comment |
To install a specific python package version whether it is the first time, an upgrade or a downgrade use:
pip install --force-reinstall MySQL_python==1.2.4
MySQL_python version 1.2.2 is not available so I used a different version. To view all available package versions from an index exclude the version:
pip install MySQL_python==
To install a specific python package version whether it is the first time, an upgrade or a downgrade use:
pip install --force-reinstall MySQL_python==1.2.4
MySQL_python version 1.2.2 is not available so I used a different version. To view all available package versions from an index exclude the version:
pip install MySQL_python==
answered Apr 5 at 7:00
Zach Weg
45147
45147
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
add a comment |
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
2
2
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
With pip 10.0.1 this is the only working solution. "-I" option actually reinstall the previous version.
– FedFranz
Jun 13 at 10:52
add a comment |
Since this appeared to be a breaking change introduced in version 10 of pip, I downgraded to a compatible version:
pip install 'pip<10'
This command tells pip to install a version of the module lower than version 10. Do this in a virutalenv so you don't screw up your site installation of Python.
add a comment |
Since this appeared to be a breaking change introduced in version 10 of pip, I downgraded to a compatible version:
pip install 'pip<10'
This command tells pip to install a version of the module lower than version 10. Do this in a virutalenv so you don't screw up your site installation of Python.
add a comment |
Since this appeared to be a breaking change introduced in version 10 of pip, I downgraded to a compatible version:
pip install 'pip<10'
This command tells pip to install a version of the module lower than version 10. Do this in a virutalenv so you don't screw up your site installation of Python.
Since this appeared to be a breaking change introduced in version 10 of pip, I downgraded to a compatible version:
pip install 'pip<10'
This command tells pip to install a version of the module lower than version 10. Do this in a virutalenv so you don't screw up your site installation of Python.
answered Sep 2 at 0:54
Trenton
6,28783751
6,28783751
add a comment |
add a comment |
There are 2 ways you may install any package with version:-
A). pip install -Iv package-name == version
B). pip install -v package-name == version
For A
Here, if you're using -I option while installing(when you don't know if the package is already installed) (like 'pip install -Iv pyreadline == 2.* 'or something), you would be installing a new separate package with the same existing package having some different version.
For B
- At first, you may want to check for no broken requirements.
pip check
2.and then see what's already installed by
pip list
3.if the list of the packages contain any package that you wish to install with specific version then the better option is to uninstall the package of this version first, by
pip uninstall package-name
4.And now you can go ahead to reinstall the same package with a specific version, by
pip install -v package-name==version
e.g. pip install -v pyreadline == 2.*
add a comment |
There are 2 ways you may install any package with version:-
A). pip install -Iv package-name == version
B). pip install -v package-name == version
For A
Here, if you're using -I option while installing(when you don't know if the package is already installed) (like 'pip install -Iv pyreadline == 2.* 'or something), you would be installing a new separate package with the same existing package having some different version.
For B
- At first, you may want to check for no broken requirements.
pip check
2.and then see what's already installed by
pip list
3.if the list of the packages contain any package that you wish to install with specific version then the better option is to uninstall the package of this version first, by
pip uninstall package-name
4.And now you can go ahead to reinstall the same package with a specific version, by
pip install -v package-name==version
e.g. pip install -v pyreadline == 2.*
add a comment |
There are 2 ways you may install any package with version:-
A). pip install -Iv package-name == version
B). pip install -v package-name == version
For A
Here, if you're using -I option while installing(when you don't know if the package is already installed) (like 'pip install -Iv pyreadline == 2.* 'or something), you would be installing a new separate package with the same existing package having some different version.
For B
- At first, you may want to check for no broken requirements.
pip check
2.and then see what's already installed by
pip list
3.if the list of the packages contain any package that you wish to install with specific version then the better option is to uninstall the package of this version first, by
pip uninstall package-name
4.And now you can go ahead to reinstall the same package with a specific version, by
pip install -v package-name==version
e.g. pip install -v pyreadline == 2.*
There are 2 ways you may install any package with version:-
A). pip install -Iv package-name == version
B). pip install -v package-name == version
For A
Here, if you're using -I option while installing(when you don't know if the package is already installed) (like 'pip install -Iv pyreadline == 2.* 'or something), you would be installing a new separate package with the same existing package having some different version.
For B
- At first, you may want to check for no broken requirements.
pip check
2.and then see what's already installed by
pip list
3.if the list of the packages contain any package that you wish to install with specific version then the better option is to uninstall the package of this version first, by
pip uninstall package-name
4.And now you can go ahead to reinstall the same package with a specific version, by
pip install -v package-name==version
e.g. pip install -v pyreadline == 2.*
answered Nov 12 at 6:14
Samarth
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f5226311%2finstalling-specific-package-versions-with-pip%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
10
Thanks for the hint, this worked for me to install an older version of openpyxl via
pip install MySQL_python==1.8.9– tim
Jun 9 '14 at 11:57
3
Yes, this also worked for pandas, thanks:
pip install -Iv pandas==0.12.0– tandy
Feb 12 '15 at 22:10
1
worked for me as well: pip install xvfbwrapper==0.2.4
– amitdatta
May 15 '16 at 18:53