I'm trying getting the following errors while trying to install/compile ctools for python (version info)
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v.1500 64 bit (AMD64)] on win32
OS: Windows 7 Professional 64-bit (Service Pack 1)
Installed: Microsoft Visual C++ 2008 Express Edition
Error:
building 'deap.cTools' extension
Traceback (most recent call last):
File "setup.py", line 40, in <module>
cmdclass = {'build_py': build_py}
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Python27\lib\distutils\command\build_ext.py", line 449, in build_extensions
self.build_extension(ext)
File "C:\Python27\lib\distutils\command\build_ext.py", line 499, in build_extension
depends=ext.depends)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
I've installed PyWin as suggested in here, but it didn't help. I'd appreciate help sorting out this issue.
Edit
Same issue arises when trying to install scikit-learn
File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
I summarized above in my blog.
http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html
To install Visual Studio 2008 Express Edition with all required components:
Install Microsoft Visual Studio 2008 Express Edition. The main Visual Studio 2008 Express installer is available from (the C++ installer name is vcsetup.exe):
Install the Microsoft Windows SDK. The Microsoft Windows SDK is available by searching Microsoft's download site, or by going directly to:
http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en
To verify that you have all installed components, check that the Microsoft SDK contains the "amd64" version of the C/C++ compiler "cl.exe". This is usually installed into
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe
copy .../VC/bin/vcvars64.bat to .../VC/bin/vcvarsamd64.bat
copy .../VC/bin/vcvars64.bat to .../VC/bin/amd64/vcvarsamd64.bat
Since you're using the 64 bit version of Python, once you have installed Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (which installs the 64bit compiler that isn't installed when installing Visual Studio 2008 SP1 Express Edition); You need to copy the vcvars64.bat to a location where vcvarsall.bat claims it to be.
From %CSIDL_PROGRAM_FILESX86%\Microsoft Visual Studio 9.0\VC\bin\, you need to copy vcvars64.bat to amd64\vcvarsamd64.bat.
Note the amd part in the destination file name.
Microsoft now publishes a Visual C++ compiler just for Python 2.7, although it will work for other versions of Python that used the same compiler. Check the system requirements: setuptools 6.0 or later is required. It will not work with packages using distutils.
I experienced this issue because I did not have the 64-bit version of Visual C++ 2008. To solve the issue, I installed it through Change/Remove in Programs and Features, following this answer.
I had this same problem, but just renaming the files listed above (in a somewhat opaque way) didn't work for me. What did work is a much easier solution. Just run vcvarsall.bat before you start the install. This sets the correct paths and is much easier to understand. In my case, I needed a 64 bit build so I ran:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
Related
I get the error
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [58 lines of output]
running install
running build
running build_py
package init file 'tools\python\dlib_init_.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\build\lib.win-amd64-3.10 -DPYTHON_EXECUTABLE=C:\Users\amade\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\build\lib.win-amd64-3.10 -A x64'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version to target Windows 10.0.19044.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/Users/amade/AppData/Local/Temp/pip-install-_k5e982w/dlib_237006073dfd4b13993bf60b7ecb3629/build/temp.win-amd64-3.10/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/amade/AppData/Local/Temp/pip-install-_k5e982w/dlib_237006073dfd4b13993bf60b7ecb3629/build/temp.win-amd64-3.10/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 222, in <module>
setup(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 568, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\amade\AppData\Local\Temp\pip-install-_k5e982w\dlib_237006073dfd4b13993bf60b7ecb3629\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Users\\amade\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\amade\\AppData\\Local\\Temp\\pip-install-_k5e982w\\dlib_237006073dfd4b13993bf60b7ecb3629\\build\\lib.win-amd64-3.10', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Follow the steps below to install face_recognition python package on Windows 10.
The instruction has been tested on Windows 10 64bit, python 3.9.
Step 1
Download CMake installation package for your OS from official site
Step 2
Install downloaded CMake installation package. Please make sure that Add CMake to system PATH option has been selected during the installation.
Step 3
Reboot your OS (restart computer)
Step 4
Run pip install dlib
It tooks several minutes so be prepared to wait
Step 5
If it completes without any errors, you're all set. Run pip install face_recognition to install face_recognition.
Result
Fixed it. I had to modify my Visual Studio install from Start menu programs, and include latest MSVC and include Windows 10 SDK under Individual Components
This question already has answers here:
dlib installation error for Python 3.9.1. How to know which version is compatible?
(2 answers)
how to solve Dlib visual studios c++ error?
(1 answer)
why i'm getting this error "check the logs for full command output" when i'm installing dlib?
(2 answers)
Closed 1 year ago.
I am installing dlib for python 3 following this because pip doesn't work, and I am installing it from source file (setup.py).
But, an error occured:
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\Users\TIN\Downloads\dlib\dlib-19.22.0\setup.py", line 222, in <module>
setup(
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\TIN\Downloads\dlib\dlib-19.22.0\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\TIN\Downloads\dlib\dlib-19.22.0\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\TIN\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\TIN\\Downloads\\dlib\\dlib-19.22.0\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\TIN\\Downloads\\dlib\\dlib-19.22.0\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=C:\\Users\\TIN\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\TIN\\Downloads\\dlib\\dlib-19.22.0\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
How to fix this problem? Also, I am on Python 3.9.4. And, it seems like I need to install Visual Studio for C++. But where can I find that?
Many binaries depend on Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 for Python 3
so, please try to use the following codes to solve it
pip install --upgrade setuptools
if you are not succeed to solve this problem,
then you can try to use this link The latest supported Visual C++ downloads to install this problem
I am attempting to use cx_Freeze to turn a .py file that I wrote in Python 3.3.4. In running the build command, I get the following error.
C:\Python33>c:\python33\python.exe setup.py build
running build
running build_exe
Traceback (most recent call last):
File "setup.py", line 22, in <module>
executables=executables
File "c:\python33\lib\site-packages\cx_Freeze\dist.py", line 365, in setup
distutils.core.setup(**attrs)
File "c:\python33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python33\lib\distutils\dist.py", line 930, in run_commands
self.run_command(cmd)
File "c:\python33\lib\distutils\dist.py", line 949, 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 949, in run_command
cmd_obj.run()
File "c:\python33\lib\site-packages\cx_Freeze\dist.py", line 234, in run
metadata = metadata)
File "c:\python33\lib\site-packages\cx_Freeze\freezer.py", line 101, in __init
__
for n in self._GetDefaultBinPathExcludes() + binPathExcludes]
File "c:\python33\lib\site-packages\cx_Freeze\freezer.py", line 235, in _GetDe
faultBinPathExcludes
import cx_Freeze.util
ImportError: DLL load failed: The specified module could not be found.
Have I not installed cx_freeze correctly? Or am I running it all wrong?
Help is greatly appreciated.
Thanks
Well, I found an answer that works for me.
Turns out there's a bug in cx_Freeze 4.3.4 and downgrading to 4.3.3 solved this problem for me.
Try opening up the util.pyd file with a tool like Dependency Walker in order to check if the error is a result of missing dependencies. I found that it was trying to load msvcr100.dll from the Microsoft Visual C++ 2010 runtime which I did not have installed on my machine. If this is also the source of your error, you can try running the x86 / x64 installer to see if this addresses it (you want to pick the one that matches the architecture of your Python installation not of your OS).
I installed python 2.7 64bit on Windows 7. I later realized that my windows is 32 bit...
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win
32
Anyway, it is still working! I also added the python installation directory in the windows path.
Than i installed easy_install using ez_setup script. And this worked, as well
C:\Users\Myname>easy_install
error: No urls, filenames, or requirements specified (see --help)
But then I am not able to install modules as Matplolib or Scipy!
C:\Users\Massimo\Dropbox\Python>easy_install scipy
Searching for scipy
Reading https://pypi.python.org/simple/scipy/
Best match: scipy 0.13.2
Downloading https://pypi.python.org/packages/source/s/scipy/scipy-0.13.2.zip#md5
=9befa30e546fba762a0c1695a509f731
Processing scipy-0.13.2.zip
Writing c:\users\massimo\appdata\local\temp\easy_install-v3knvt\scipy-0.13.2\set
up.cfg
Running scipy-0.13.2\setup.py -q bdist_egg --dist-dir c:\users\massimo\appdata\l
ocal\temp\easy_install-v3knvt\scipy-0.13.2\egg-dist-tmp-tatxbl
Traceback (most recent call last):
File "c:\python27\scripts\easy_install-script.py", line 9, in <module>
load_entry_point('setuptools==0.8', 'console_scripts', 'easy_install')()
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1992
, in main
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1979
, in with_ei_usage
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1996
, in <lambda>
File "c:\python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 380,
in run
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 623,
in easy_install
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 653,
in install_item
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 849,
in install_eggs
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1130
, in build_and_install
File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1115
, in run_setup
File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 69, in run_setup
File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 120, in run
File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 71, in <lambda>
File "setup.py", line 230, in <module>
File "setup.py", line 218, in setup_package
ImportError: No module named numpy.distutils.core
Thanks.
Christoph Gohlke provides pre-built Windows installers here including scipy. Your best bet is to use one of them, the reason being that installing scipy, numpy & matplotlib from source requires building both C and Fortran extensions which most Windows machines do not have the compiler for.
Alternatively there are a number of pre-build istallations that include python and some other tools:
Anaconda: A free distribution
for the SciPy stack. Supports Linux, Windows and Mac.
Enthought Canopy: The free and
commercial versions include the core SciPy stack packages. Supports Linux,
Windows and Mac.
Python(x,y): A free distribution
including the SciPy stack, based around the Spyder IDE. Windows only.
WinPython: A free distribution
including the SciPy stack. Windows only.
Pyzo: A free distribution based on Python 3 with the IEP editor. Supports Linux and Windows.
I have installed psyco in one machine with no problem, but i'm getting an strange error while installing in one other machine.
I'm not able to use easy_install, since it gives me an error:
C:\Python26\Downloads\psyco-1.6>easy_install psyco
Searching for psyco
Reading http://pypi.python.org/simple/psyco/
Reading http://psyco.sourceforge.net/
Best match: psyco snapshot
Downloading http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.tar.gz
error: Can't download http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.t
ar.gz: 404 Not Found
So, I download the last version 1.6 and did "python setup.py install". I have already used it several times with no problem. I get the follwing messages:
C:\Python26\Downloads\psyco-1.6>python setup.py install
PROCESSOR = 'i386'
running install
running build
running build_py
running build_ext
building 'psyco._psyco' extension
Traceback (most recent call last):
File "setup.py", line 180, in <module>
**kwds )
File "C:\python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\python26\lib\distutils\command\install.py", line 577, in run
self.run_command('build')
File "C:\python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\python26\lib\distutils\command\build.py", line 134, in run
self.run_command(cmd_name)
File "C:\python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\python26\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\python26\lib\distutils\command\build_ext.py", line 449, in build_exte
nsions
self.build_extension(ext)
File "C:\python26\lib\distutils\command\build_ext.py", line 499, in build_exte
nsion
depends=ext.depends)
File "C:\python26\lib\distutils\msvc9compiler.py", line 449, in compile
self.initialize()
File "C:\python26\lib\distutils\msvc9compiler.py", line 359, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\python26\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsal
l
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
Any ideas on why I'm getting this error?
Thanks
It appears that psyco has extension modules that need to be built. The error message you're getting is not what I would expect, but it seems to indicate that it's not finding the Microsoft Visual C++ compiler, required (at least recommended over other compilers) for building extension modules for Python 2.6.
If you really want to build from sources, I suggest you download the Microsoft Visual C++ 2008 Express Edition or Microsoft Visual Studio 2008 trial.
You would probably be better off reading this thread, and downloading a pre-compiled binary from someone in the community who has already compiled it.
Edit: I just noticed that on the Psyco home page there is a link to Python 2.6 pre-compiled binaries by Michael Foord. These would be preferable.
I am trying to get around this problem too (while trying to install another module). The problem is the script msvc9compiler.py is trying to find and vcvarsall.bat which is under a folder like C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC which in turn is trying to find and execute a script under C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools in my case vcvars32.bat. This script is setting-updating certain variables: PATH, LIB and 2 others that are never set/updated in your case.
My workaround was to find the *.bat manually and run it in the prompt from which I would then run the installation command. The variables are set correctly this way but only during the session of the command prompt.
Try running echo %LIB%, before and after running the script, to see that the variable is indeed set.