PySurfer/MNE安装报错求助:ImportError: No module named retrying(Ubuntu16.04)
Hey there, that error is super straightforward—it just means your Python environment is missing the retrying module that MNE depends on. Let's get this sorted out quickly:
First, match your Python version to the install command
Ubuntu 16.04 comes with both Python 2 and Python 3 pre-installed. Make sure you're using the rightpipfor the environment where you installed MNE:- If you're using Python 2 (the system default), run:
sudo pip install retrying - If you're using Python 3, use:
sudo pip3 install retrying
- If you're using Python 2 (the system default), run:
Using a virtual environment? Activate it first
If you installed MNE inside a virtual environment (which is a good practice!), don't usesudo. Instead:- Activate your environment (replace
your_venvwith your actual environment name):source your_venv/bin/activate - Install the module:
pip install retrying
- Activate your environment (replace
Permission issues? Install for your user only
If you get a permission error with the above commands, skipsudoand install the module just for your account:pip install --user retrying(orpip3 install --user retryingfor Python 3)
Once you've installed retrying, try importing MNE again—it should work without that error now.
内容的提问来源于stack exchange,提问作者Hugo Loyola

