当前位置: 首页 > 工具软件 > IronPython > 使用案例 >

ironpython使用numpy_为IronPython安装numpy

弓晔
2023-12-01

我想用c#在IronPython中运行一些代码。在这段代码中,我需要使用numpy。所以我尝试使用以下命令安装它:ipy -X:Frames -m pip install -U numpy

不幸的是,我得到一个错误和一条返回消息,告诉我这是一个不成功的安装。错误消息如下:Using cached https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip

Installing collected packages: numpy

Running setup.py install for numpy ... error

Complete output from command "C:\Program Files\IronPython 2.7\ipy.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\mbhamida\\appdata\\local\\temp\\pip-build-t61kxu\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mbhamida\appdata\local\temp\pip-y91bz0-record\install-record.txt --single-version-externally-managed --compile:

Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install

with pip instead of using `setup.py install`:

- `pip install .` (from a git repo or downloaded source

release)

- `pip install numpy` (last NumPy release on PyPi)

C:\Program Files\IronPython 2.7\Lib\distutils\dist.py:1: UserWarning: Unknown distribution option: 'python_requires'

"""distutils.dist

blas_opt_info:

blas_mkl_info:

customize MSVCCompiler

libraries mkl_rt not found in ['C:\\Program Files\\IronPython 2.7\\lib']

NOT AVAILABLE

blis_info:

customize MSVCCompiler

libraries blis not found in ['C:\\Program Files\\IronPython 2.7\\lib']

NOT AVAILABLE

openblas_info:

customize MSVCCompiler

customize MSVCCompiler

libraries openblas not found in ['C:\\Program Files\\IronPython 2.7\\lib']

Traceback (most recent call last):

File "", line 1, in

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 410, in

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\core.py", line 135, in setup

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 625, in get_info

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 433, in get_info

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 625, in get_info

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 1758, in calc_info

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\fcompiler\__init__.py", line 61, in

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 402, in setup_package

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 167, in configuration

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 1032, in add_subpackage

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 998, in get_subpackage

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 940, in _get_configuration_from_setup_py

File "numpy\setup.py", line 10, in configuration

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 1032, in add_subpackage

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 998, in get_subpackage

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 940, in _get_configuration_from_setup_py

File "numpy\core\setup.py", line 832, in configuration

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 433, in get_info

File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 1621, in calc_info

TypeError: a new-style class can't have only classic bases

----------------------------------------

Command ""C:\Program Files\IronPython 2.7\ipy.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\mbhamida\\appdata\\local\\temp\\pip-build-t61kxu\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mbhamida\appdata\local\temp\pip-y91bz0-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\

我搜索了很多关于解决方案的信息,但我想这是一个非常常见的问题。Ps:我和许多其他软件包面临同样的问题。

什么是解决方案?

 类似资料: