I am invoking pip
commands from within my Python file. I am testing a simple download at the moment.
import pip
directory = 'C:/Users/me/Documents/tests'
package = 'psycopg2'
arguments = ['--only-binary=:all:', '--no-deps', '--platform',
'manylinux1_x86_64', '--implementation', 'cp',
'--abi', 'cp27mu', '--dest', directory, package]
def download():
pip.main(['download'] + arguments)
download()
It successfully downloads it, but I cannot see the file in the directory. If I run it again, it even says:
File was already downloaded c:\users\me\documents\tests\psycopg2-2.7.3.2-cp27-cp27mu-manylinux1_x86_64.whl
Edit
When I try changing the directory, and re-download I get this message:
Using cached psycopg2-2.7.3.2-cp27-cp27mu-manylinux1_x86_64.whl
Sounds like it is saving it in some sort of temp directory instead of the specified one?