title: why Installing external package in canopy python gives valueEror in windows?
body: <p>This question has been asked a couple of times and I spend at least five hours trying to incorporate suggestions in those posts [but was mostly unsuccessful. </p>
  
  <p>I installed Canopy Enthought python on my windows and now I want to install Levenshtein package available at <a href="https://code.google.com/p/pylevenshtein/" rel="nofollow noreferrer">https://code.google.com/p/pylevenshtein/</a>. </p>
  
  <p>I extracted and tried to run using usual python command but got the following error. </p>
  
  <pre><code>(Canopy 64bit) C:\Users\mary\Desktop&gt;cd python-Levenshtein-0.11.2
  
  (Canopy 64bit) C:\Users\mary\Desktop\python-Levenshtein-0.11.2&gt;python setup.
  py install
  running install
  running bdist_egg
  running egg_info
  writing requirements to python_Levenshtein.egg-info\requires.txt
  writing python_Levenshtein.egg-info\PKG-INFO
  writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
  
  writing top-level names to python_Levenshtein.egg-info\top_level.txt
  writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
  writing entry points to python_Levenshtein.egg-info\entry_points.txt
  reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '*' under directory 'docs'
  warning: no previously-included files matching '*pyc' found anywhere in distribu
  tion
  warning: no previously-included files matching '.project' found anywhere in dist
  ribution
  warning: no previously-included files matching '.pydevproject' found anywhere in
   distribution
  writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
  installing library code to build\bdist.win-amd64\egg
  running install_lib
  running build_ext
  building 'Levenshtein' extension
  Traceback (most recent call last):
    File "setup.py", line 46, in &lt;module&gt;
      """,
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\core.py", line 152, in setup
      dist.run_commands()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\install.py", line 73, in run
      self.do_egg_install()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\install.py", line 93, in do_egg_install
      self.run_command('bdist_egg')
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\bdist_egg.py", line 179, in run
      cmd = self.call_command('install_lib', warn_dir=0)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\bdist_egg.py", line 166, in call_command
      self.run_command(cmdname)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\install_lib.py", line 20, in run
      self.build()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\command\install_lib.py", line 111, in build
      self.run_command('build_ext')
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\build_ext.py", line 46, in run
      _build_ext.run(self)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 337, in run
      self.build_extensions()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 446, in build_extens
  ions
      self.build_extension(ext)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
  setuptools\command\build_ext.py", line 182, in build_extension
      _build_ext.build_extension(self,ext)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 496, in build_extens
  ion
      depends=ext.depends)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 514, in compile
      self.initialize()
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 424, in initialize
      vc_env = query_vcvarsall(VERSION, plat_spec)
    File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
  0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 340, in query_vcvarsall
      raise ValueError(str(list(result.keys())))
  ValueError: [u'path']
  
  (Canopy 64bit) C:\Users\mary\Desktop\python-Levenshtein-0.11.2&gt;
  </code></pre>
  
  <p>I followed these posts but remained unsuccessful in solving this issue:
  <a href="https://stackoverflow.com/questions/13596407/errors-while-building-installing-c-module-for-python-2-7">Errors while building/installing C module for Python 2.7</a>
  <a href="http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html" rel="nofollow noreferrer">http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html</a></p>
  
  <p>Any help will be greatly appreciated. </p>