我正在嘗試有效地編寫量子力學時間演化代碼,這需要我對非常大但非常稀疏的哈密頓矩陣求冪。為此,我一直在嘗試安裝 expokit python 包裝器 ( https://github.com/weinbe58/expokitpy ),但遇到了問題。我在 Mac 上,一旦我下載了文件并運行python setup.py install終端,就會運行一個安裝過程,然后返回xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrunxcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrunerror: Command "/usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -I/opt/anaconda3/lib/python3.7/site-packages/numpy/core/include -c -c ./expokit/lapack.f -o build/temp.macosx-10.9-x86_64-3.7/expokit/lapack.o" failed with exit status 這是我第一次安裝不使用的軟件包pip install,我不知道這里發生了什么。任何幫助深表感謝!PS 如果有人知道我應該使用的更好的軟件包,也請告訴我!
1 回答

當年話下
TA貢獻1890條經驗 獲得超9個贊
這不是 python 的問題,你的 xcode 沒有正確安裝(或缺少權限或其他東西)。
xcode-select?--install
可能會修復它。
另外,為什么不直接使用 scipy 呢?Scipy 提供相同的功能,如果您已經在使用 numpy/scipy,它可能會更適合您。
添加回答
舉報
0/150
提交
取消