Description
Environment
- Pythonnet version: 2.3
- Python version: 2.7.11
- Operating System: Windows 10
- Visual Studio version 2017 installed
Details
- Attempting to install pythonnet using powershell as administrator
- Python install is not managed by Canopy, but Canopy Installed. Same error produced by using easy_install.exe
An error appears after update of nuget. This appears after NuGet update:
Installed:
3 package(s) to packages.config projects
Microsoft (R) Manifest Tool version 10.0.10011.16384
Copyright (c) Microsoft Corporation 2012.
All rights reserved.
Microsoft (R) Build Engine version 4.6.1038.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.Microsoft (R) Build Engine version 4.6.1038.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
The Error:
CSC : error CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default [C:\u
AppData\Local\Enthought\Canopy\User\Lib\site-packages\pythonnet-2.3.0\src\runtime\Python.Runtime.csproj
CSC : error CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default [C:\u
AppData\Local\Enthought\Canopy\User\Lib\site-packages\pythonnet-2.3.0\src\clrmodule\clrmodule.csproj]
_TODO_
- What commands did you run to trigger this issue?
Executing command:python setup.py build_ext --inplace
The first execution is an update of Nuget (every time).
NuGet is updated from 3.5.0 to 4.1.0, and installed 'successfully'.
If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
print('TODO')
- If there was a crash, please include the traceback here.
Traceback (most recent call last):
File "setup.py", line 405, in
zip_safe=False,
File "C:\Program Files\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Program Files\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Program Files\Anaconda3\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Program Files\Anaconda3\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "C:\Program Files\Anaconda3\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "setup.py", line 222, in build_extension
subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
File "C:\Program Files\Anaconda3\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" pythonnet.sln /p:C
onfiguration=ReleaseWin /p:Platform=x64 /p:DefineConstants="PYTHON36,PYTHON3,UCS2" /p:PythonBuildDir="C:\users\sdurbridg
e\AppData\Local\Enthought\Canopy\User\Lib\site-packages\pythonnet-2.3.0" /p:PythonInteropFile="interop36.cs" /verbosity:
minimal /p:PythonManifest="C:\users\sdurbridge\AppData\Local\Enthought\Canopy\User\Lib\site-packages\pythonnet-2.3.0\app
.manifest" /t:Build' returned non-zero exit status 1.
print('TODO')
- If someone could spare some time to point me in the correct direction, I would appreciate it. I have noticed some stackexchange posts related to seeing the same issue when working with .NET 4.6 and C#, but no direct notes on a python interface, so I am not sure how to continue trying to use this solution.
- Thank you!