Skip to content

Can't install pythonnet with Mono 5 #470

@phuihock

Description

@phuihock

Environment

  • Pythonnet version: 2.3.0
  • Python version: 2.7.12+
  • Operating System: Ubuntu 16.10

Details

Upgraded Mono from 4.8 to 5.0.0.100 today, can't install pythonnet anymore. Errors thrown during installation. Installation works fine if I revert Mono back to 4.8

  • What commands did you run to trigger this issue?
    pip install --upgrade pythonnet==2.3.0
  • If there was a crash, please include the traceback here.
    XBuild Engine Version 14.0
    Mono, Version 5.0.0.0
    Copyright (C) 2005-2013 Various Mono authors
    		Configuration: ReleaseMono Platform: x64
    /tmp/pip-build-8dGdQm/pythonnet/src/runtime/Python.Runtime.csproj: error : Error executing task Copy: Error converting Property named 'SourceFiles' with value '$(TargetAssemblyPdb)' to type Microsoft.Build.Framework.ITaskItem[]: Can't concatenate Item list with other strings where an item list is expected ('@(_OutDirItem->'%(FullPath)')', 'Python.Runtime.pdb'). Use semi colon to separate items.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-8dGdQm/pythonnet/setup.py", line 405, in <module>
        zip_safe=False,
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/home/phuihock/Work/mono5/env/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
        self.run_command('build')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
        self.run_command(cmd_name)
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/usr/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
        self.build_extension(ext)
      File "/tmp/pip-build-8dGdQm/pythonnet/setup.py", line 222, in build_extension
        subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
      File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'xbuild pythonnet.sln /p:Configuration=ReleaseMono /p:Platform=x64 /p:DefineConstants="PYTHON27,PYTHON2,UCS4,MONO_LINUX,PYTHON_WITHOUT_ENABLE_SHARED" /p:PythonBuildDir="/tmp/pip-build-8dGdQm/pythonnet/build/lib.linux-x86_64-2.7" /p:PythonInteropFile="interop27.cs" /verbosity:minimal /t:Build' returned non-zero exit status 1
    
    ----------------------------------------
Command "/home/phuihock/Work/mono5/env/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8dGdQm/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-PVMfSd-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/phuihock/Work/mono5/env/include/site/python2.7/pythonnet" failed with error code 1 in /tmp/pip-build-8dGdQm/pythonnet/

If there is any other log/command output I should include, please advice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions