-
Notifications
You must be signed in to change notification settings - Fork 751
setup.py build with mono in XUbuntu can't load System.Core (NuGet?) #411
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
@theresa-anne which build instructions? Our documentation isn't very updated, so it not be correct. |
python setup.py build_ext --inplace |
try Did the install complete (regardless of which setup.py command you used)? |
I don't think so, it exited with a trace report, but I soon discovered that I had exceeded my allocated disk space and had to start over with Virtual Box. Give me some time to try again. |
Brew is only for OSX. Please share your terminal session for full installation steps, e.g. using asciinema. |
Here's the latest attempt:
This time I went to the wiki (could not find "travis.yml") and followed the first step of the Anaconda instructions from the wiki... VirtualBox:~/anaconda2/bin$ pip install -i https://pypi.anaconda.org/pythonnet/simple pythonnet Unhandled Exception: Failed building wheel for pythonnet
Command "/home/krebst/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-cTGPAM/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-5E3ZxQ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-cTGPAM/pythonnet/ |
Can you install mono-complete? I'm afraid mono-runtime is not enough.
…On Mon, Feb 27, 2017, 4:09 PM theresa-anne ***@***.***> wrote:
Here's the latest attempt:
1. Create a new XUbuntu guest in Virtual Box
2. Install Guest Additions
3. sudo apt install mono-runtime
4. bash Anaconda2-4.3.0-Linux-x86_64.sh
5. cd to the Anaconda2 bin directory (home/user....)
This time I went to the wiki (could not find "travis.yml") and followed
the first step of the Anaconda instructions from the wiki...
VirtualBox:~/anaconda2/bin$ pip install -i
https://pypi.anaconda.org/pythonnet/simple pythonnet
Collecting pythonnet
Downloading
https://pypi.anaconda.org/pythonnet/simple/pythonnet/2.2.2/pythonnet-2.2.2.tar.gz
(1.5MB)
100% |████████████████████████████████| 1.5MB 112kB/s
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet ... error
Complete output from command /home/krebst/anaconda2/bin/python -u -c
"import setuptools, tokenize;*file*='/tmp/pip-build-cTGPAM/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/tmprlxFZjpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly
'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
at NuGet.CommandLine.Program.Main (System.String[] args) <0x40e87d50 +
0x00023> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could
not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
at NuGet.CommandLine.Program.Main (System.String[] args) <0x40e87d50 +
0x00023> in :0
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 376, in
setup_requires=setup_requires
File "/home/krebst/anaconda2/lib/python2.7/distutils/core.py", line 151,
in setup
dist.run_commands()
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 953,
in run_commands
self.run_command(cmd)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972,
in run_command
cmd_obj.run()
File
"/home/krebst/anaconda2/lib/python2.7/site-packages/wheel/bdist_wheel.py",
line 179, in run
self.run_command('build')
File "/home/krebst/anaconda2/lib/python2.7/distutils/cmd.py", line 326, in
run_command
self.distribution.run_command(command)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972,
in run_command
cmd_obj.run()
File "/home/krebst/anaconda2/lib/python2.7/distutils/command/build.py",
line 127, in run
self.run_command(cmd_name)
File "/home/krebst/anaconda2/lib/python2.7/distutils/cmd.py", line 326, in
run_command
self.distribution.run_command(command)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972,
in run_command
cmd_obj.run()
File
"/home/krebst/anaconda2/lib/python2.7/distutils/command/build_ext.py", line
340, in run
self.build_extensions()
File
"/home/krebst/anaconda2/lib/python2.7/distutils/command/build_ext.py", line
449, in build_extensions
self.build_extension(ext)
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 129, in
build_extension
self._install_packages()
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 246, in
_install_packages
check_call(cmd, shell=use_shell)
File "/home/krebst/anaconda2/lib/python2.7/subprocess.py", line 186, in
check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe update
-self' 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 /home/krebst/anaconda2/bin/python -u -c
"import setuptools, tokenize;*file*='/tmp/pip-build-cTGPAM/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-5E3ZxQ-record/install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_ext
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at NuGet.CommandLine.Program.Main (System.String[] args) <0x401d1d50 + 0x00023> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at NuGet.CommandLine.Program.Main (System.String[] args) <0x401d1d50 + 0x00023> in <filename unknown>:0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 376, in <module>
setup_requires=setup_requires
File "/home/krebst/anaconda2/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/krebst/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/setuptools/command/install.py", line 61, in run
File "/home/krebst/anaconda2/lib/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/home/krebst/anaconda2/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/krebst/anaconda2/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/home/krebst/anaconda2/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/krebst/anaconda2/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/krebst/anaconda2/lib/python2.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/krebst/anaconda2/lib/python2.7/distutils/command/build_ext.py", line 449, in build_extensions
self.build_extension(ext)
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 129, in build_extension
self._install_packages()
File "/tmp/pip-build-cTGPAM/pythonnet/setup.py", line 246, in _install_packages
check_call(cmd, shell=use_shell)
File "/home/krebst/anaconda2/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe update -self' returned non-zero exit status 1
----------------------------------------
Command "/home/krebst/anaconda2/bin/python -u -c "import setuptools,
tokenize;*file*='/tmp/pip-build-cTGPAM/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-5E3ZxQ-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/tmp/pip-build-cTGPAM/pythonnet/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#411 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5Wq7ii3rEXIR3cpIwpan-2GvPhW9ks5rg0m1gaJpZM4MNnkD>
.
|
It seems to be working, but setup is taking an extremely long time to run. I'll follow up late tonight or first thing tomorrow morning to confirm it solved. Thanks for your help! Worked. |
Closing, let us know if you find any issues |
reopening with one last request for feedback. Here's the latest after installing mono-complete: ** I don't recall the mono install asking me for permission to update my PATH. Could this be the issue? krebst@krebst-VirtualBox:~/anaconda2/bin$ pip install -i https://pypi.anaconda.org/pythonnet/simple pythonnet NuGet Config files used: Feeds used: Installed: Failed building wheel for pythonnet
Command "/home/krebst/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-FdOQqR/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-Zh59mb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-FdOQqR/pythonnet/ |
you are using Mono Version 4.2.1.0 from 2013-2015. Look at installation guide for later mono versions: http://www.mono-project.com/docs/getting-started/install/linux/ alternatively you can try our docker images: |
related resolved issue with the same error: |
@theresa-anne I'm closing this issue due to inactivity. feel free to report back. |
Environment
Details
I am getting started with Python for .NET in mono on XUbuntu, all 64-bit, in VirtualBox. I installed 64-bit Anaconda2, and unzipped the Python for .NET source materials into the Anaconda bin folder. Note that mono was not built using "brew" (I first discovered that here, and could give it a try). The environment can't load System.Core, and the error report mentions NuGet. I'm a bit of a novice to this community, so I come on bended knee - please feel free to point me to an older thread if necessary. I did search, and did not find what I thought I needed, but things that seem obvious to others may be a learning curve for me. Thanks. - T
from GitHub. Not worried about NPython.exe just yet, just willing to import clr and reference assemblies
as necessary. Any and all help appreciated.
Someone mentioned to me that the OS installs certain Python libraries for its own use and that virtual environments with select libraries are the preferred method. If that's the case, then can someone share their experience with using selected libraries to install Python for .NET, i.e. which libraries you used and which libraries you avoided, if relevant? Thank you so much.
The text was updated successfully, but these errors were encountered: