我正在尝试在具有.NET Core 2.1的Ubuntu 16.04上使用IronPython 2.7.9,但无法运行surepip命令。
ubuntu@silver:/data/lsLocal/IronPython.2.7.9/netcoreapp2.1$ bash ipy.sh -X:Frames -m ensurepip
Traceback (most recent call last):
File "/data/lsLocal/IronPython.2.7.9/Lib/logging/__init__.py", line 868, in emit
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 108, in format
if self.should_color():
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 95, in should_color
if hasattr(real_stream, "isatty") and real_stream.isatty():
IOError: [Errno 2] Could not load file or assembly 'Mono.Posix.NETStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Logged from file basecommand.py, line 1
Traceback (most recent call last):
File "/data/lsLocal/IronPython.2.7.9/Lib/logging/__init__.py", line 868, in emit
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 108, in format
if self.should_color():
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 95, in should_color
if hasattr(real_stream, "isatty") and real_stream.isatty():
IOError: [Errno 2] Could not load file or assembly 'Mono.Posix.NETStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Logged from file req_set.py, line 1
Traceback (most recent call last):
File "/data/lsLocal/IronPython.2.7.9/Lib/logging/__init__.py", line 868, in emit
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 108, in format
if self.should_color():
File "/tmp/tmpaT4f7q/pip-8.1.1-py2.py3-none-any.whl/pip/utils/logging.py", line 95, in should_color
if hasattr(real_stream, "isatty") and real_stream.isatty():
IOError: [Errno 2] Could not load file or assembly 'Mono.Posix.NETStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Logged from file basecommand.py, line 1
它抱怨没有单声道程序集,但是由于我使用的是.NET Core,所以感觉好像我做错了什么。
这是我的dotnet信息:
ubuntu@silver:/data/lsLocal/IronPython.2.7.9/netcoreapp2.1$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /data/lsLocal/dotnet/sdk/2.1.500/
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
2.1.500 [/data/lsLocal/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [/data/lsLocal/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [/data/lsLocal/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.6 [/data/lsLocal/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
是否有说明可以在ubuntu上将pip与.NET Core一起使用?