2
votes

I could install psycopg2 using pip outside a virtualenv (first part of my copy-paste below), but not inside a virtualenv that i created using virtualenvwrapper-win

Full list of modules in my python and in the python inside virtualenv (name = venv) below in the code

C:\Users\Som>pip freeze Django==1.6.4 Pygments==1.6 colorama==0.3.1 httpie==0.8.0 psycopg2==2.5.2 requests==2.3.0 south==0.8.4 virtualenv==1.9.1 virtualenvwrapper-win==1.1.5

C:\Users\Som>workon env

virtualenv "env" does not exist. Create it with "mkvirtualenv env"

C:\Users\Som>lsvirtualenv

dir /b /ad "C:\Users\Som\Envs" ============================================================================== venv webfactionenv

C:\Users\Som>workon venv (venv) C:\Users\Som>pip freeze Django==1.6.5 django-toolbelt==0.0.1

(venv) C:\Users\Som>pip install psycopg2 Downloading/unpacking psycopg2 Running setup.py egg_info for package psycopg2

Installing collected packages: psycopg2 Running setup.py install for psycopg2 building 'psycopg2._psycopg' extension error: Unable to find vcvarsall.bat Complete output from command C:\Users\Som\Envs\venv\Scripts\python.exe -c "i mport setuptools;file='C:\Users\Som\Envs\venv\build\psycopg2\setup.py ';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\som\appdata\local\temp\pip-aywkat-record\install-recor d.txt --single-version-externally-managed --install-headers C:\Users\Som\Envs\ve nv\include\site\python2.7: running install

running build

running build_py

running build_ext

building 'psycopg2._psycopg' extension

error: Unable to find vcvarsall.bat

---------------------------------------- Command C:\Users\Som\Envs\venv\Scripts\python.exe -c "import setuptools;file ='C:\Users\Som\Envs\venv\build\psycopg2\setup.py';exec(compile(open(fil e).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users \som\appdata\local\temp\pip-aywkat-record\install-record.txt --single-version-ex ternally-managed --install-headers C:\Users\Som\Envs\venv\include\site\python2.7 failed with error code 1 in C:\Users\Som\Envs\venv\build\psycopg2 Storing complete log in C:\Users\Som\pip\pip.log

1
possible duplicate of error: Unable to find vcvarsall.battutuca

1 Answers

1
votes

Thanks. However, I found out that installing the exe from this link in the method specify definitely solves the problem

http://www.stickpeople.com/projects/python/win-psycopg/