-1

I am looking to centralize all my package requirements into a single location, preferably a plain text file, to simplify deployment. My application depends on simple to install packages like Flask:

(pythonenv) C:\>pip install flask

and pre-built Windows binary packages like psycopg2 from Stickpeople Project:

(pythonenv) C:\>easy_install psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe

pip has a very useful argument for what I want to do:

(pythonenv) C:\>pip install -r python_packages.txt

except that I have yet to find a way to get pip to install the pre-built Windows binaries.

How can I group all my dependent packages into a single location?

Some ways I can think of that would make this possible:

  • Does easy_install have a similar way of using files that list packages?
  • Is there a way to get pip to install the pre-built binary and include a binary package in a pip requirements file?

I am developing with Python 2.7.3, and I am using virtualenv.

jpmc26
  • 28,463
  • 14
  • 94
  • 146
  • related: [Can I install Python windows packages into virtualenvs?](http://stackoverflow.com/questions/3271590/can-i-install-python-windows-packages-into-virtualenvs) – jfs Dec 18 '12 at 21:37
  • I completely revised my question to be more clear about what I'm asking. I'm considering the batch file. That might be the best way to go, although I was hoping to avoid such a kludge. – jpmc26 Dec 18 '12 at 22:11

1 Answers1

0

Here is the strategy that works pretty well in my computer:

1) Install Visual Studio 2008 (Express Edition is OK)

2) Call pip commands from "Visual Studio 2008 Command Prompt".

Python needs VS2008 compiler(or equivelant gcc,mingw) for compiling binaries. These command prompt sets up the environment for you.

For users that are new to Visual Studio product family: Multiple versions of Visual Studio don't conflict with each other. So you can keep you current Visual Studio edition, you don't need to uninstall it in order to install another Visual Studio product.

Seçkin Savaşçı
  • 3,446
  • 2
  • 23
  • 39
  • I have Visual Studio on my development machine. I do not want it on my product server. Additionally, psycopg2 also requires "pg_config" to build, which I believe is a bash script. I'm not sure this would work even if I installed PostgreSQL on my development machine. Thank you for the input, though. – jpmc26 Dec 18 '12 at 21:35
  • Thanks. After this, I thought more about what I'm asking and clarified my question. – jpmc26 Dec 18 '12 at 22:10