How to use Python's pip to download and keep the zipped files for a package?
If I want to use the pip
command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
python pip
add a comment |
If I want to use the pip
command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
python pip
add a comment |
If I want to use the pip
command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
python pip
If I want to use the pip
command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
python pip
python pip
asked Sep 4 '11 at 15:42
John CJohn C
3,38993861
3,38993861
add a comment |
add a comment |
6 Answers
6
active
oldest
votes
The --download-cache
option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the tar.gz
files were there.
The --download
option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the --download
option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
The pip
documentation outlines using --download
for fast & local installs.
5
Nice, that did indeed work - although I tagged a--no-install
option on. And you're right about the funky filenames, but at least the files are there.
– John C
Sep 4 '11 at 16:42
last time I checked ,--download
option download the package with dependencies.
– Mohammad Niknam
Aug 10 '13 at 12:15
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Usepip download somepackage
.
– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
Specifically, the new equivalent ispip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
|
show 4 more comments
I always do this to download the packages:
pip install --download /path/to/download/to_packagename
OR
pip install --download=/path/to/packages/downloaded -r requirements.txt
And when I want to install all of those libraries I just downloaded, I do this:
pip install --no-index --find-links="/path/to/downloaded/dependencies" packagename
OR
pip install --no-index --find-links="/path/to/downloaded/packages" -r requirements.txt
Update
Also, to get all the packages installed on one system, you can export them all to requirement.txt
that will be used to intall them on another system, we do this:
pip freeze > requirement.txt
Then, the requirement.txt
can be used as above for download, or do this to install them from requirement.txt
:
pip install -r requirement.txt
REFERENCE: pip installer
add a comment |
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
@knoctepip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to usesudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
Note thatpip download
also supports-r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned
– Hawkins
Apr 12 '18 at 12:58
add a comment |
In version 7.1.2 pip downloads the wheel of a package (if available) with the following:
pip install package -d /path/to/downloaded/file
The following downloads a source distribution:
pip install package -d /path/to/downloaded/file --no-binary :all:
These download the dependencies as well, if pip is aware of them (e.g., if pip show package
lists them).
Update
As noted by Anton Khodak, pip download
command is preferred since version 8. In the above examples this means that /path/to/downloaded/file
needs to be given with option -d
, so replacing install
with download
works.
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
add a comment |
Use pip download <package1 package2 package n>
to download all the packages including dependencies
Use pip install --no-index --find-links . <package1 package2 package n>
to install all the packages including dependencies.
It gets all the files from CWD
.
It will not download anything
add a comment |
pip wheel
is another option you should consider:
pip wheel mypackage -w .outputdir
It will download packages and their dependencies to a directory (current working directory by default), but it performs the additional step of converting any source packages to wheels.
It conveniently supports requirements files:
pip wheel -r requirements.txt -w .outputdir
Add the --no-deps
argument if you only want the specifically requested packages:
pip wheel mypackage -w .outputdir --no-deps
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%2f7300321%2fhow-to-use-pythons-pip-to-download-and-keep-the-zipped-files-for-a-package%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
The --download-cache
option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the tar.gz
files were there.
The --download
option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the --download
option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
The pip
documentation outlines using --download
for fast & local installs.
5
Nice, that did indeed work - although I tagged a--no-install
option on. And you're right about the funky filenames, but at least the files are there.
– John C
Sep 4 '11 at 16:42
last time I checked ,--download
option download the package with dependencies.
– Mohammad Niknam
Aug 10 '13 at 12:15
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Usepip download somepackage
.
– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
Specifically, the new equivalent ispip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
|
show 4 more comments
The --download-cache
option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the tar.gz
files were there.
The --download
option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the --download
option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
The pip
documentation outlines using --download
for fast & local installs.
5
Nice, that did indeed work - although I tagged a--no-install
option on. And you're right about the funky filenames, but at least the files are there.
– John C
Sep 4 '11 at 16:42
last time I checked ,--download
option download the package with dependencies.
– Mohammad Niknam
Aug 10 '13 at 12:15
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Usepip download somepackage
.
– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
Specifically, the new equivalent ispip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
|
show 4 more comments
The --download-cache
option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the tar.gz
files were there.
The --download
option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the --download
option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
The pip
documentation outlines using --download
for fast & local installs.
The --download-cache
option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the tar.gz
files were there.
The --download
option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the --download
option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
The pip
documentation outlines using --download
for fast & local installs.
edited Nov 21 '17 at 21:13
Matthew Murdoch
20.4k2480120
20.4k2480120
answered Sep 4 '11 at 16:37
Mark GemmillMark Gemmill
5,19922220
5,19922220
5
Nice, that did indeed work - although I tagged a--no-install
option on. And you're right about the funky filenames, but at least the files are there.
– John C
Sep 4 '11 at 16:42
last time I checked ,--download
option download the package with dependencies.
– Mohammad Niknam
Aug 10 '13 at 12:15
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Usepip download somepackage
.
– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
Specifically, the new equivalent ispip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
|
show 4 more comments
5
Nice, that did indeed work - although I tagged a--no-install
option on. And you're right about the funky filenames, but at least the files are there.
– John C
Sep 4 '11 at 16:42
last time I checked ,--download
option download the package with dependencies.
– Mohammad Niknam
Aug 10 '13 at 12:15
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Usepip download somepackage
.
– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
Specifically, the new equivalent ispip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
5
5
Nice, that did indeed work - although I tagged a
--no-install
option on. And you're right about the funky filenames, but at least the files are there.– John C
Sep 4 '11 at 16:42
Nice, that did indeed work - although I tagged a
--no-install
option on. And you're right about the funky filenames, but at least the files are there.– John C
Sep 4 '11 at 16:42
last time I checked ,
--download
option download the package with dependencies.– Mohammad Niknam
Aug 10 '13 at 12:15
last time I checked ,
--download
option download the package with dependencies.– Mohammad Niknam
Aug 10 '13 at 12:15
3
3
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
--download-cache is deprecated. use pip install --download <dir> <pkg>
– ostler.c
Jan 20 '15 at 17:13
13
13
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Use pip download somepackage
.– Sнаđошƒаӽ
Dec 20 '15 at 5:26
pip install --download
in now deprecated, and will be removed from pip 10. pip.pypa.io/en/latest/reference/pip_download/#overview. Use pip download somepackage
.– Sнаđошƒаӽ
Dec 20 '15 at 5:26
11
11
Specifically, the new equivalent is
pip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
Specifically, the new equivalent is
pip download -d <dir> { -r requirements.txt | <packagename> }
– rrauenza
Mar 23 '16 at 17:12
|
show 4 more comments
I always do this to download the packages:
pip install --download /path/to/download/to_packagename
OR
pip install --download=/path/to/packages/downloaded -r requirements.txt
And when I want to install all of those libraries I just downloaded, I do this:
pip install --no-index --find-links="/path/to/downloaded/dependencies" packagename
OR
pip install --no-index --find-links="/path/to/downloaded/packages" -r requirements.txt
Update
Also, to get all the packages installed on one system, you can export them all to requirement.txt
that will be used to intall them on another system, we do this:
pip freeze > requirement.txt
Then, the requirement.txt
can be used as above for download, or do this to install them from requirement.txt
:
pip install -r requirement.txt
REFERENCE: pip installer
add a comment |
I always do this to download the packages:
pip install --download /path/to/download/to_packagename
OR
pip install --download=/path/to/packages/downloaded -r requirements.txt
And when I want to install all of those libraries I just downloaded, I do this:
pip install --no-index --find-links="/path/to/downloaded/dependencies" packagename
OR
pip install --no-index --find-links="/path/to/downloaded/packages" -r requirements.txt
Update
Also, to get all the packages installed on one system, you can export them all to requirement.txt
that will be used to intall them on another system, we do this:
pip freeze > requirement.txt
Then, the requirement.txt
can be used as above for download, or do this to install them from requirement.txt
:
pip install -r requirement.txt
REFERENCE: pip installer
add a comment |
I always do this to download the packages:
pip install --download /path/to/download/to_packagename
OR
pip install --download=/path/to/packages/downloaded -r requirements.txt
And when I want to install all of those libraries I just downloaded, I do this:
pip install --no-index --find-links="/path/to/downloaded/dependencies" packagename
OR
pip install --no-index --find-links="/path/to/downloaded/packages" -r requirements.txt
Update
Also, to get all the packages installed on one system, you can export them all to requirement.txt
that will be used to intall them on another system, we do this:
pip freeze > requirement.txt
Then, the requirement.txt
can be used as above for download, or do this to install them from requirement.txt
:
pip install -r requirement.txt
REFERENCE: pip installer
I always do this to download the packages:
pip install --download /path/to/download/to_packagename
OR
pip install --download=/path/to/packages/downloaded -r requirements.txt
And when I want to install all of those libraries I just downloaded, I do this:
pip install --no-index --find-links="/path/to/downloaded/dependencies" packagename
OR
pip install --no-index --find-links="/path/to/downloaded/packages" -r requirements.txt
Update
Also, to get all the packages installed on one system, you can export them all to requirement.txt
that will be used to intall them on another system, we do this:
pip freeze > requirement.txt
Then, the requirement.txt
can be used as above for download, or do this to install them from requirement.txt
:
pip install -r requirement.txt
REFERENCE: pip installer
edited Jan 23 '14 at 10:12
answered Sep 24 '13 at 18:23
securecurvesecurecurve
3,53932762
3,53932762
add a comment |
add a comment |
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
@knoctepip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to usesudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
Note thatpip download
also supports-r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned
– Hawkins
Apr 12 '18 at 12:58
add a comment |
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
@knoctepip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to usesudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
Note thatpip download
also supports-r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned
– Hawkins
Apr 12 '18 at 12:58
add a comment |
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
answered Jul 3 '16 at 9:33
Anton KhodakAnton Khodak
648611
648611
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
@knoctepip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to usesudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
Note thatpip download
also supports-r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned
– Hawkins
Apr 12 '18 at 12:58
add a comment |
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
@knoctepip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to usesudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
Note thatpip download
also supports-r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned
– Hawkins
Apr 12 '18 at 12:58
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
and how to install the downloaded packages later?
– knocte
Nov 16 '16 at 5:25
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
This is the most up-to-date answer. Thanks
– KJ50
Nov 30 '16 at 1:07
2
2
@knocte
pip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
@knocte
pip install path-to-downloaded-package
– Anton Khodak
Nov 30 '16 at 8:50
2
2
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to use
sudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
tried that some days ago and I think it still tried to retrieve deps from the internet instead of using the downloaded ones; IIRC, I had to use
sudo pip install <path-to-downloaded-package> --no-index --find-links `pwd`
– knocte
Nov 30 '16 at 9:09
1
1
Note that
pip download
also supports -r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned– Hawkins
Apr 12 '18 at 12:58
Note that
pip download
also supports -r requirements.txt
so you can easily download them all from an internet-connected machine then copy to an offline machine and install how the above commenters mentioned– Hawkins
Apr 12 '18 at 12:58
add a comment |
In version 7.1.2 pip downloads the wheel of a package (if available) with the following:
pip install package -d /path/to/downloaded/file
The following downloads a source distribution:
pip install package -d /path/to/downloaded/file --no-binary :all:
These download the dependencies as well, if pip is aware of them (e.g., if pip show package
lists them).
Update
As noted by Anton Khodak, pip download
command is preferred since version 8. In the above examples this means that /path/to/downloaded/file
needs to be given with option -d
, so replacing install
with download
works.
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
add a comment |
In version 7.1.2 pip downloads the wheel of a package (if available) with the following:
pip install package -d /path/to/downloaded/file
The following downloads a source distribution:
pip install package -d /path/to/downloaded/file --no-binary :all:
These download the dependencies as well, if pip is aware of them (e.g., if pip show package
lists them).
Update
As noted by Anton Khodak, pip download
command is preferred since version 8. In the above examples this means that /path/to/downloaded/file
needs to be given with option -d
, so replacing install
with download
works.
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
add a comment |
In version 7.1.2 pip downloads the wheel of a package (if available) with the following:
pip install package -d /path/to/downloaded/file
The following downloads a source distribution:
pip install package -d /path/to/downloaded/file --no-binary :all:
These download the dependencies as well, if pip is aware of them (e.g., if pip show package
lists them).
Update
As noted by Anton Khodak, pip download
command is preferred since version 8. In the above examples this means that /path/to/downloaded/file
needs to be given with option -d
, so replacing install
with download
works.
In version 7.1.2 pip downloads the wheel of a package (if available) with the following:
pip install package -d /path/to/downloaded/file
The following downloads a source distribution:
pip install package -d /path/to/downloaded/file --no-binary :all:
These download the dependencies as well, if pip is aware of them (e.g., if pip show package
lists them).
Update
As noted by Anton Khodak, pip download
command is preferred since version 8. In the above examples this means that /path/to/downloaded/file
needs to be given with option -d
, so replacing install
with download
works.
edited May 23 '17 at 10:31
Community♦
11
11
answered Dec 11 '15 at 10:51
jasaarimjasaarim
1,157715
1,157715
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
add a comment |
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
I have to develop in windows and deploy on RH7 with no internet connection at all. So I download the source packages with --no-binary :all: . However this fails when Collecting django-pyodbc-azure==2.0.4.1 as this package has no source. Is there a way to download the source or if this does not exist, to download the weehl?
– cwhisperer
May 14 '18 at 11:33
add a comment |
Use pip download <package1 package2 package n>
to download all the packages including dependencies
Use pip install --no-index --find-links . <package1 package2 package n>
to install all the packages including dependencies.
It gets all the files from CWD
.
It will not download anything
add a comment |
Use pip download <package1 package2 package n>
to download all the packages including dependencies
Use pip install --no-index --find-links . <package1 package2 package n>
to install all the packages including dependencies.
It gets all the files from CWD
.
It will not download anything
add a comment |
Use pip download <package1 package2 package n>
to download all the packages including dependencies
Use pip install --no-index --find-links . <package1 package2 package n>
to install all the packages including dependencies.
It gets all the files from CWD
.
It will not download anything
Use pip download <package1 package2 package n>
to download all the packages including dependencies
Use pip install --no-index --find-links . <package1 package2 package n>
to install all the packages including dependencies.
It gets all the files from CWD
.
It will not download anything
edited Mar 8 '18 at 7:44
answered Feb 22 '18 at 12:29
Siva Kranthi KumarSiva Kranthi Kumar
8581012
8581012
add a comment |
add a comment |
pip wheel
is another option you should consider:
pip wheel mypackage -w .outputdir
It will download packages and their dependencies to a directory (current working directory by default), but it performs the additional step of converting any source packages to wheels.
It conveniently supports requirements files:
pip wheel -r requirements.txt -w .outputdir
Add the --no-deps
argument if you only want the specifically requested packages:
pip wheel mypackage -w .outputdir --no-deps
add a comment |
pip wheel
is another option you should consider:
pip wheel mypackage -w .outputdir
It will download packages and their dependencies to a directory (current working directory by default), but it performs the additional step of converting any source packages to wheels.
It conveniently supports requirements files:
pip wheel -r requirements.txt -w .outputdir
Add the --no-deps
argument if you only want the specifically requested packages:
pip wheel mypackage -w .outputdir --no-deps
add a comment |
pip wheel
is another option you should consider:
pip wheel mypackage -w .outputdir
It will download packages and their dependencies to a directory (current working directory by default), but it performs the additional step of converting any source packages to wheels.
It conveniently supports requirements files:
pip wheel -r requirements.txt -w .outputdir
Add the --no-deps
argument if you only want the specifically requested packages:
pip wheel mypackage -w .outputdir --no-deps
pip wheel
is another option you should consider:
pip wheel mypackage -w .outputdir
It will download packages and their dependencies to a directory (current working directory by default), but it performs the additional step of converting any source packages to wheels.
It conveniently supports requirements files:
pip wheel -r requirements.txt -w .outputdir
Add the --no-deps
argument if you only want the specifically requested packages:
pip wheel mypackage -w .outputdir --no-deps
edited Nov 26 '18 at 23:24
answered Nov 22 '18 at 0:47
jpmc26jpmc26
14.6k756101
14.6k756101
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.
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%2f7300321%2fhow-to-use-pythons-pip-to-download-and-keep-the-zipped-files-for-a-package%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