-
Notifications
You must be signed in to change notification settings - Fork 748
Fail to install pythonnet for python 2.7 #686
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
Comments
This is probably due to newer Mono 5.12 version than Mono 5.10 that we are testing against: |
Many thanks. I uninstall the newest version of Mono and install it from Linux Mint repository. The version is: mono --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen Try it again:
the traceback info is:
Any advice? |
Mono 4.2 is too old, follow installation from official Mono website or better follow our travis-ci script: https://www.mono-project.com/download/stable/#download-lin |
Dear denfromufa,
and try again:
the traceback info:
What happens this time? Many thanks. |
Have you tried to install from master branch?
…On Fri, Jun 15, 2018, 6:15 AM harryln ***@***.***> wrote:
Dear denfromufa,
I downgraded Mono to 5.10.0 following
https://www.mono-project.com/download/stable/#download-lin.
mono --version
Mono JIT compiler version 5.10.0.160 (tarball Wed Mar 7 15:30:00 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
and try again:
sudo -H pip2 install pythonnet
the traceback info:
sudo -H pip2 install pythonnet
Collecting pythonnet
Using cached https://files.pythonhosted.org/packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b478b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-LvfpKZ/pythonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-8_YxcJ --python-tag cp27:
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 3.5.0.
Updating NuGet.exe to 4.6.2.
Update successful.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
Restoring NuGet package NUnit.ConsoleRunner.3.6.0.
Restoring NuGet package NUnit.3.6.0.
Restoring NuGet package UnmanagedExports.1.2.7.
GET https://api.nuget.org/v3-flatcontainer/unmanagedexports/1.2.7/unmanagedexports.1.2.7.nupkg
GET https://api.nuget.org/v3-flatcontainer/nunit.consolerunner/3.6.0/nunit.consolerunner.3.6.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/nunit/3.6.0/nunit.3.6.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/unmanagedexports/1.2.7/unmanagedexports.1.2.7.nupkg 428ms
Installing UnmanagedExports 1.2.7.
Adding package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
OK https://api.nuget.org/v3-flatcontainer/nunit.consolerunner/3.6.0/nunit.consolerunner.3.6.0.nupkg 884ms
Installing NUnit.ConsoleRunner 3.6.0.
Adding package 'NUnit.ConsoleRunner.3.6.0' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
Added package 'NUnit.ConsoleRunner.3.6.0' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
OK https://api.nuget.org/v3-flatcontainer/nunit/3.6.0/nunit.3.6.0.nupkg 1377ms
Installing NUnit 3.6.0.
Adding package 'NUnit.3.6.0' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
Added package 'NUnit.3.6.0' to folder '/tmp/pip-install-LvfpKZ/pythonnet/packages'
NuGet Config files used:
/root/.config/NuGet/NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
3 package(s) to packages.config projects
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0
Mono, Version 5.10.0.160
Copyright (C) 2005-2013 Various Mono authors
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0
Mono, Version 5.10.0.160
Copyright (C) 2005-2013 Various Mono authors
Configuration: ReleaseMono Platform: x64
/tmp/pip-install-LvfpKZ/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-install-LvfpKZ/pythonnet/setup.py", line 405, in <module>
zip_safe=False,
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
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 "/usr/local/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 202, 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-install-LvfpKZ/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-install-LvfpKZ/pythonnet/build/lib.linux-x86_64-2.7" /p:PythonInteropFile="interop27.cs" /verbosity:minimal /t:Build' returned non-zero exit status 1
----------------------------------------
Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-LvfpKZ/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-record-3FieDl/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.6.2.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
All packages listed in packages.config are already installed.
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0
Mono, Version 5.10.0.160
Copyright (C) 2005-2013 Various Mono authors
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0
Mono, Version 5.10.0.160
Copyright (C) 2005-2013 Various Mono authors
Configuration: ReleaseMono Platform: x64
/tmp/pip-install-LvfpKZ/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-install-LvfpKZ/pythonnet/setup.py", line 405, in <module>
zip_safe=False,
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
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 "/usr/local/lib/python2.7/dist-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-install-LvfpKZ/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-install-LvfpKZ/pythonnet/build/lib.linux-x86_64-2.7" /p:PythonInteropFile="interop27.cs" /verbosity:minimal /t:Build' returned non-zero exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-LvfpKZ/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-record-3FieDl/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-LvfpKZ/pythonnet/
What happens this time? Many thanks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#686 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5YS9N_gCtlN2N8VJtkeVwKQMzbrqks5t85dqgaJpZM4UnlQO>
.
|
Hi there,
|
@harryln the error in your build is most likely due to missing dependency (python-dev), please follow travis ci build script to install all dependencies:
|
Dear @denfromufa, Many thanks for your reply. After installing
I then try again:
it works.
still does not work. One of packages I use needs Many thanks again for your time. |
@harryln you can install pythonnet 2.3 if you install the corresponding Mono version, probably 4.8.0. But I highly recommend the pythonnet master branch (2.4.0.dev1). |
Environment
Details
I have tried to install
pythonnet
for python 2.7 by:The trace-back info is following:
What can I do? Many thanks for your help.
The text was updated successfully, but these errors were encountered: