Skip to content

setup.py fails on Windows 7 / 64Bit #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rnestler opened this issue Apr 20, 2016 · 2 comments
Closed

setup.py fails on Windows 7 / 64Bit #207

rnestler opened this issue Apr 20, 2016 · 2 comments

Comments

@rnestler
Copy link
Contributor

When I try running setup.py on my machine I get the following error:

(dotnettest) c:\work\git\pythonnet>python setup.py bdist_wheel
running bdist_wheel
running build
running build_ext
All packages listed in packages.config are already installed.
Traceback (most recent call last):
  File "setup.py", line 354, in <module>
    setup_requires=setup_requires
  File "C:\WinPython27\python-2.7.10\Lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\WinPython27\python-2.7.10\Lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\WinPython27\python-2.7.10\Lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Users\rnestler\Envs\dotnettest\lib\site-packages\wheel\bdist_wheel.py", line 175, in run
    self.run_command('build')
  File "C:\WinPython27\python-2.7.10\Lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\WinPython27\python-2.7.10\Lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\WinPython27\python-2.7.10\Lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\WinPython27\python-2.7.10\Lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\WinPython27\python-2.7.10\Lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\WinPython27\python-2.7.10\Lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\WinPython27\python-2.7.10\Lib\distutils\command\build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 180, in build_extension
    manifest = self._get_manifest(dest_dir)
  File "setup.py", line 194, in _get_manifest
    mt = _find_msbuild_tool("mt.exe", use_windows_sdk=True)
  File "setup.py", line 95, in _find_msbuild_tool
    raise RuntimeError("%s could not be found" % tool)
RuntimeError: mt.exe could not be found

Apparently it can't find mt.exe. I have VS2012 installed and mt.exe does exist on my system.

rnestler added a commit to rnestler/pythonnet that referenced this issue Apr 20, 2016
While _find_msbuild_tool searches in the registry to find the given
build tool, it doesn't check if it's already in PATH.

If one uses a developer command prompt to build, all necessary tools are
in PATH.

Fixes pythonnet#207 for me
rnestler added a commit to rnestler/pythonnet that referenced this issue Apr 20, 2016
While _find_msbuild_tool searches in the registry to find the given
build tool, it doesn't check if it's already in PATH.

If one uses a developer command prompt to build, all necessary tools are
in PATH.

Fixes pythonnet#207 for me
@rnestler
Copy link
Contributor Author

More system information:

(dotnettest) c:\work\git\pythonnet>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

(dotnettest) c:\work\git\pythonnet>where mt
C:\Program Files (x86)\Windows Kits\8.0\bin\x86\mt.exe

(dotnettest) c:\work\git\pythonnet>where msbuild
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe

@den-run-ai
Copy link
Contributor

den-run-ai commented Apr 20, 2016

related:

#194

rnestler added a commit to rnestler/pythonnet that referenced this issue Apr 20, 2016
While _find_msbuild_tool searches in the registry to find the given
build tool, it doesn't check if it's already in PATH.

If one uses a developer command prompt to build, all necessary tools are
in PATH.

Fixes pythonnet#207 for me
tonyroberts pushed a commit that referenced this issue Jun 23, 2016
While _find_msbuild_tool searches in the registry to find the given
build tool, it doesn't check if it's already in PATH.

If one uses a developer command prompt to build, all necessary tools are
in PATH.

Fixes #207 for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants