0

I am using windows 8.1 64-bit with python 3.3. I have tried to execute easy_install pyodbc and pip install pyodbc each got different errors like below:

easy_install pyodbc:

C:\Python33>easy_install pyodbc Searching for pyodbc Reading https://pypi.python.org/simple/pyodbc/ Best match: pyodbc 3.0.10 Downloading

Processing pyodbc-3.0.10.tar.gz

Writing c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\s etup.cfg Running pyodbc-3.0.10\setup.py -q bdist_egg --dist-dir



c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\egg-dist-tmp-onfjbk

error: c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\py odbc.egg-info\SOURCES.txt: The process cannot access the file because it is bein g used by another process

pip install pyodbc :

C:\Python33>pip install pyodbc Collecting pyodbc Using cached pyodbc-3.0.10.tar.gz Installing collected packages: pyodbc

 Running setup.py install for pyodbc ... error
    Complete output from command C:\Python33\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\chaith~1\\appdata\\local\\temp\\pip-build-8xaz3g
\\pyodbc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read(
).replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\chaith~1\
appdata\local\temp\pip-xaf4bf-record\install-record.txt --single-version-externa
lly-managed --compile:
running install
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).


----------------------------------------

 Command "C:\Python33\python.exe -u -c "import setuptools,
 tokenize;__file__='c:\
 \users\\chaith~1\\appdata\\local\\temp\\pip-build-8xaz3g\\pyodbc\\setup.py';exec
 (compile(getattr(tokenize, 'open',
 open)(__file__).read().replace('\r\n', '\n'),  __file__, 'exec'))"
 install --record c:\users\chaith~1\appdata\local\temp\pip-x
 af4bf-record\install-record.txt --single-version-externally-managed
 --compile" f ailed with error code 1 in c:\users\chaith~1\appdata\local\temp\pip-build-8xaz3g \pyodbc\

I have gone mad searching for the solutions. please help me it is very important for me to connect the sql server database with python

  • Either install the msvc compiler (and all other prerequisites).. or go pick up your ppyodbc here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc – thebjorn May 16 '16 at 10:26
  • Tried that already but, they haven't got windows binaries for python 3.3 – chaithanya May 16 '16 at 14:25
  • Then you'll either need to upgrade your Python or install correct versions of the build-tools and required libraries (it's a pita on windows, but perfectly doable..) – thebjorn May 16 '16 at 14:29
  • I have done that but it is showing **pyodbc-3.0.10-cp34-none-win_amd64 (2).whl** is not a supported wheel on this platform. I am using 64 bit windows and python 3.4.2 – chaithanya May 16 '16 at 20:18
  • You're on 64-bit Windows, but is your Python 32 or 64 bit? Just type `python` at the command line (does it say 'on win32'?). I believe Python's default download defaults to 32-bit. – FlipperPA May 17 '16 at 14:41

1 Answers1

0

The way @thebjorn suggests solves the problem. More detail is found here: pyodbc requires python 3.3. I just used that method an houror so ago to install 64 bit pyobdc 3.0.10 with python 3.5.1 (for use with pydev running under Eclipse Mars.2) on 64-bit Win 7 Enterprise SP 1.

I ran across a seemingly intimidating exception thrown by the install process (I've documented it in that question) but pyobdc works and pip says it's installed.

BTW, Python 3.5.1 can be installed on Win 7, etc. without admin rights once Microsoft patch KB2999226 has been applied (but that does need admin rights).

Community
  • 1
  • 1
user1459519
  • 712
  • 9
  • 20