PyRhO似乎在安装时破坏了我的其他库 [英] PyRhO seems to have broken my other libraries upon installation

查看:83
本文介绍了PyRhO似乎在安装时破坏了我的其他库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Ubuntu 18.10和Python 3.6,并且使用该笔记本电脑和常见的Python库(numpy,scipy,matplotlib)已经好几个月了.我用过

I'm running Ubuntu 18.10 and Python 3.6, and have been using this laptop and common Python libraries (numpy, scipy, matplotlib) without any issue for several months now. I used

pip3 install pyrho

根据我的某些特定需求安装 PyRhO模块.它安装没有问题,然后不更改我的代码中的任何内容,便像往常一样运行它:

to install the PyRhO module for some specific needs I had. It installed without issue, then without changing anything in my code, I ran it like I always do:

python3 [filename].py

这给了我一个我从未见过的错误:

This gave me an error I'd never seen before:

python3 chiral_tensor.py Traceback (most recent call last):
  File "chiral_tensor.py", line 1, in <module>
    import numpy as np
  File "/home/chris/.local/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/chris/.local/lib/python3.6/site-packages/numpy/core/__init__.py", line 59, in <module>
    from . import numeric
  File "/home/chris/.local/lib/python3.6/site-packages/numpy/core/numeric.py", line 3093, in <module>
    from . import fromnumeric
  File "/home/chris/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 17, in <module>
    from . import _methods
  File "/home/chris/.local/lib/python3.6/site-packages/numpy/core/_methods.py", line 158, in <module>
    _NDARRAY_ARRAY_FUNCTION = mu.ndarray.__array_function__
AttributeError: type object 'numpy.ndarray' has no attribute '__array_function__'

我尝试查看ndarray对象的属性并搜索错误,但没有发现任何东西.当我注释掉

I've tried looking at the ndarray object's attributes and Googling the error, but I haven't found anything. When I comment out the

import numpy

行,对于scipy,我只会得到相同的确切错误,如果我注释掉scipy行,则对于matplotlib,将会得到相同的确切错误.

line, I just get the same exact error for scipy, then for matplotlib if I comment out the scipy line.

此后,我一直尝试卸载PyRhO,但没有进行任何更改.我尝试卸载并重新安装numpy,但这也没有解决.

I've since tried uninstalling PyRhO, which didn't change anything. I've tried uninstalling and reinstalling numpy, but that hasn't fixed it either.

我对Linux还是一个相对较新的人,所以也许我做了我不应该做的事情,但是如果我做了,那我就看不到了.如果有人有任何建议,将不胜感激.预先感谢.

I'm still relatively new to Linux, so maybe I did something I shouldn't have, but if I did, I'm not seeing it. If anyone has any advice, it would be much appreciated. Thanks in advance.

推荐答案

尝试使用文档建议的安装:

pip install pyrho[full]

不只是

pip install pyrho

这篇关于PyRhO似乎在安装时破坏了我的其他库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆