我想使用physics.quantum.TensorProduct' method in
sympy`。看看the repo這個方法肯定存在。試圖導入到我的Python會話然而,當我得到如下:在本地版本的python包中找不到回購模塊
>>> from sympy import *
>>> physics.quantum.TensorProduct(v1,v2)
Traceback (most recent call last):
File "<pyshell#271>", line 1, in <module>
physics.quantum.TensorProduct(v1,v2)
AttributeError: module 'sympy.physics' has no attribute 'quantum'
我用無縫作爲pip
安裝pip install sympy
sympy。如果我嘗試升級pip install sympy --upgrade
,我收到Requirement already up-to-date
消息。
這是爲什麼這個腳本不包括在內?我如何得到它,以便它從repo下載並在我的python會話中識別?
感謝
您確定安裝的sympy版本與存儲庫中的版本匹配嗎?也許運行'pip freeze'來查看你安裝的軟件包的版本。 – jobou
'pip freeze'顯示我正在使用'sympy 1.1.1'。我如何知道存儲庫現在位於哪個版本? – user32882