为什么我会出现这样的错误:AttributeError: module 'mne.time_frequency' has no attribute 'psd_welch'
时间: 2023-10-04 18:07:41 浏览: 329
这个错误可能是因为您使用的mne库版本不支持psd_welch函数。请确保您的mne版本是最新的,并尝试使用以下命令安装最新版本的mne:
```
pip install -U mne
```
如果您已经安装了最新版本的mne但仍然遇到此错误,请尝试使用以下命令重新安装mne:
```
pip uninstall mne
pip install mne
```
这应该会解决您的问题。
相关问题
AttributeError: module 'mne.time_frequency' has no attribute 'psd_welch'
这个错误可能是因为您正在使用 mne 库的一个过时版本。在最新的 mne 版本中,`psd_welch` 已被重命名为 `psd_welch`。请尝试将您的 mne 库更新到最新版本,或者将您的代码中的 `psd_welch` 改为 `psd_welch`。您可以使用以下命令在终端中更新 mne:
```
pip install -U mne
```
Traceback (most recent call last): File "C:\Users\20238\PycharmProjects\pythonProject2\study\SAE_test.py", line 329, in <module> process(i) File "C:\Users\20238\PycharmProjects\pythonProject2\study\SAE_test.py", line 295, in process trial_band_power = trial_psd_extraction_integration(X) # data shape (12, 8064) File "C:\Users\20238\PycharmProjects\pythonProject2\study\SAE_test.py", line 191, in trial_psd_extraction_integration psd_origin, f = mne.time_frequency.psd_multitaper(raw, fmin=0, fmax=60, n_fft=128, picks='all', verbose=None) AttributeError: module 'mne.time_frequency' has no attribute 'psd_multitaper' Process finished with exit code 1
这是Python的一个错误提示。它告诉我们在文件路径为"C:\Users\20238\PycharmProjects\pythonProject2\study\SAE_test.py"的代码中,第329行出现了一个错误。在这个文件中的第295行的函数"process"中,调用了一个名为"trial_psd_extraction_integration"的函数,并将其结果赋给了变量"trial_band_power"。
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![py](https://img-home.csdnimg.cn/images/20250102104920.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)