Recently, I have been reading a lot about Geroku, and I am thinking about moving to him. I thought I would try to participate a bit and play a little with him.
Ok Confession Time. As long as I have installed virtualenv, I really don't use it. I am not a guy who very often switches between different projects (for example, as a contractor, which I need to do). I really like the idea of ββthis, but it is not. I know that everyone says these are the best practices these days.
The problem that I have is that I cannot get pip to install psycopg2 (which is part of the tutorial). Btw, here is a link to what I'm trying to do ( article to the hero )
So for me this is not a new problem. I could never get this thing to install via pip. I always run into a problem
Could not find vcvarsall.bat
The way I solved this in the past on a Windows machine was to simply load the prebuild libraries. If someone is interested and doesn't know, you can find it here ! By the way, thanks, Christoph Golke for supporting these !!!!
If you are looking for this vcvarsall.bat error, you will find several posts for it in Stackoverflow. None of them helped me. At first I tried to go the MingGW route. After literally 2 nights of effort (and I think I tried every suggestion I could find), I gave up (right before I threw my computer out of the window and continued to defeat the kitten). So, I tried another route that people offer - which should download the version of VC ++ 2008 Express from Microsoft. Python seems to be built for Windows with VC ++ 2008, and for some people this is much simpler than using MinGW. This seems to have worked a lot better for me, because I can at least get pip to install it. But when I try to import, I get another common problem that people seem to have a problem with (at least you get hits when you do this).
File "C: \ foo \ bar \ venv \ lib \ site-packages \ psycopg2__init __.py", line 67, from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: Error loading DLL: operating system not can run% 1.
After some research, it seems like this is a problem with the compiled _psycopg.pyd file trying to set the link in libpq.dll. This file is located in C: \ Program Files (x86) \ PostgreSQL \ 9.1 \ bin \ - and this is in my way.
So does anyone know how to fix this? Or is there a way to get pip to use pyscopg2, which has already been successfully installed (via pre-created libraries) in my sites? Note. I can fix the problem if I simply copy the pre-prepared psycopg2 package to the virtual environment site packages. he will import the fine. However, when you hang with beer for the requirements of the hero, it is not there. Is there any way to fake a hero on this?
Environment: Windows 7 (64 bit), Python 2.6.5, Django 1.3.1, virtualenv 1.6.4, PostgreSQL 9.1, pip 1.0.2