I am setting up python's cryptodome on a Windows 7 64 bit machine. I am using the setup.py module to achieve this. The reason I am using setup.py instead of pip is because the machine that I am installing this on does not have external internet access and thus pip will not work.
I have installed the 64 bit c++ compilers using Windows SDK and have run the following commands on the cmd line per the instructions spelled out from the following link.
- List item cd "C:\Program Files\Microsoft SDKs\Windows\v7.1"
- List item cmd /V:ON /K Bin\SetEnv.Cmd /x64 /release
- List item set DISTUTILS_USE_SDK=1
When I run setup.py I get the following error message:
File "setup.py", line 443, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Python33\cryptodome\pycryptodome-3.8.2\compiler_opt.py", line 304, in
set_compiler_options
clang = compiler_is_clang()
File "C:\Python33\cryptodome\pycryptodome-3.8.2\compiler_opt.py", line 239, in
compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Python33\cryptodome\pycryptodome-3.8.2\compiler_opt.py", line 82, in
test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "C:\Python33\lib\distutils\msvc9compiler.py", line 461, in compile
self.initialize()
File "C:\Python33\lib\distutils\msvc9compiler.py", line 372, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python33\lib\distutils\msvc9compiler.py", line 288, in query_vcvarsal
raise ValueError(str(list(result.keys())))
ValueError: ['path']
Here is the code that looks to be associated with the error:
#looks to contain a set of possible environment variable names
interesting = set(("include", "lib", "libpath", "path"))
#populates result with keys and values from actual environment variables
stdout = stdout.decode("mbcs")
for line in stdout.split("\n"):
line = Reg.convert_mbcs(line)
if '=' not in line:
continue
line = line.strip()
key, value = line.split('=', 1)
key = key.lower()
if key in interesting:
if value.endswith(os.pathsep):
value = value[:-1]
result[key] = removeDuplicates(value)
#tests whether all the keys within result are in interesting
if len(result) != len(interesting):
raise ValueError(str(list(result.keys())))
Could this be due to some missing values within the environment variables? If so, what should those vales be?