title: ImportError: No module named pyodbc (Windows )
body: <p><code>Python 3.3</code>, <code>pip</code> is installed and PATH is:</p>
  
  <pre><code>C:\Python33\Scripts 
  </code></pre>
  
  <p>I have downloaded <code>visual c++ 2010</code>, do I need to change any configuration or add the <code>.bat</code> file to python 33 package from <code>vc++</code>?</p>
  
  <p>When I try to install <code>pyodbc</code> I get the following:</p>
  
  <pre><code>C:\Users\elyon&gt;pip install https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip Collecting https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip   Using cached https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip Installing collected packages: pyodbc   Running setup.py install for pyodbc
      building 'pyodbc' extension
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 288, in &lt;module&gt;
          main()
        File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 108, in main
          setup(**kwargs)
        File "C:\Python33\lib\distutils\core.py", line 148, in setup
          dist.run_commands()
        File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
          self.run_command(cmd)
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
          cmd_obj.run()
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\install.py", line 61, in run
        File "C:\Python33\lib\distutils\command\install.py", line 569, in run
          self.run_command('build')
        File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
          cmd_obj.run()
        File "C:\Python33\lib\distutils\command\build.py", line 126, in run
          self.run_command(cmd_name)
        File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
          cmd_obj.run()
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 50, in run
        File "C:\Python33\lib\distutils\command\build_ext.py", line 347, in run
          self.build_extensions()
        File "C:\Python33\lib\distutils\command\build_ext.py", line 456, in build_ extensions
          self.build_extension(ext)
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 183, in build_extension
        File "C:\Python33\lib\distutils\command\build_ext.py", line 511, in build_ extension
          depends=ext.depends)
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
          self.initialize()
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
  
          vc_env = query_vcvarsall(VERSION, plat_spec)
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \msvc9_support.py", line 52, in query_vcvarsall
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcva rsall
          raise ValueError(str(list(result.keys())))
      ValueError: ['path']
      Complete output from command C:\Python33\python.EXE -c "import setuptools, t okenize;__file__='c:\\users\\elyon\\appdata\\local\\temp\\pip-30p009-build\\s etup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace(' \r\n', '\n'), __file__, 'exec'))" install --record c:\users\elyon\appdata\loc al\temp\pip-v0vcs5-record\install-record.txt
  --single-version-externally-managed  --compile:
      running install
  
      running build
  
      running build_ext
  
      building 'pyodbc' extension
  
      Traceback (most recent call last):
  
        File "&lt;string&gt;", line 1, in &lt;module&gt;
  
        File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 288, in &lt;module&gt;
  
          main()
  
        File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 108, in main
  
          setup(**kwargs)
  
        File "C:\Python33\lib\distutils\core.py", line 148, in setup
  
          dist.run_commands()
  
        File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
  
          self.run_command(cmd)
  
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
  
          cmd_obj.run()
  
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\install.py", line 61, in run
  
        File "C:\Python33\lib\distutils\command\install.py", line 569, in run
  
          self.run_command('build')
  
        File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
  
          self.distribution.run_command(command)
  
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
  
          cmd_obj.run()
  
        File "C:\Python33\lib\distutils\command\build.py", line 126, in run
  
          self.run_command(cmd_name)
  
        File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
  
          self.distribution.run_command(command)
  
        File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
  
          cmd_obj.run()
  
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 50, in run
  
        File "C:\Python33\lib\distutils\command\build_ext.py", line 347, in run
  
          self.build_extensions()
  
        File "C:\Python33\lib\distutils\command\build_ext.py", line 456, in build_ extensions
  
          self.build_extension(ext)
  
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 183, in build_extension
  
        File "C:\Python33\lib\distutils\command\build_ext.py", line 511, in build_ extension
  
          depends=ext.depends)
  
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
  
          self.initialize()
  
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
  
  
          vc_env = query_vcvarsall(VERSION, plat_spec)
  
        File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \msvc9_support.py", line 52, in query_vcvarsall
  
        File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcva rsall
  
          raise ValueError(str(list(result.keys())))
  
      ValueError: ['path']
  
      ----------------------------------------
      Command "C:\Python33\python.EXE -c "import setuptools, tokenize;__file__='c: \\users\\elyon\\appdata\\local\\temp\\pip-30p009-build\\setup.py';exec(compil e(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file
  __, 'exec'))" install --record c:\users\elyon\appdata\local\temp\pip-v0vcs5-r ecord\install-record.txt --single-version-externally-managed
  --compile" failed w ith error code 1 in 
  c:\users\elyon\appdata\local\temp\pip-30p009-build
  </code></pre>
  
  <p>This is the code:</p>
  
  <pre><code>import pyodbc
  print pyodbc.dataSources()
  print "Connecting via ODBC"
  conn = pyodbc.connect("DRIVER={Netezza};SERVER=netezza201;PORT=5480;DATABASE=Test;UID=CompanyUser;PWD=Password!;")
  cursor = conn.cursor()
  </code></pre>