Contributing guide - uninstalling mne to switch to dev version prone to errors
See original GitHub issueContributing guide advises to install mne via conda:
curl --remote-name https://raw.githubusercontent.com/mne-tools/mne-python/main/environment.yml
conda env create --file environment.yml --name mnedev
but then, when saying how to switch the python to the dev version, it suggests to uninstall mne via pip:
pip uninstall -y mne
which gave me an error:
(mnedev) C:\src>pip uninstall -y mne
Found existing installation: mne 0.24.1
Uninstalling mne-0.24.1:
Successfully uninstalled mne-0.24.1
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\commands\uninstall.py", line 102, in run
uninstall_pathset.commit()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\req\req_uninstall.py", line 420, in commit
self._moved_paths.commit()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\req\req_uninstall.py", line 273, in commit
save_dir.cleanup()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\utils\temp_dir.py", line 173, in cleanup
rmtree(self._path)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 326, in wrapped_f
return self(f, *args, **kw)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 406, in __call__
do = self.iter(retry_state=retry_state)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 362, in iter
raise retry_exc.reraise()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 195, in reraise
raise self.last_attempt.result()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\concurrent\futures\_base.py", line 439, in result
return self.__get_result()
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\concurrent\futures\_base.py", line 391, in __get_result
raise self._exception
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 409, in __call__
result = fn(*args, **kwargs)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\site-packages\pip\_internal\utils\misc.py", line 124, in rmtree
shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\shutil.py", line 749, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\shutil.py", line 627, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\mmagn\Continuum\anaconda3\envs\mnedev\lib\shutil.py", line 625, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\mmagn\\AppData\\Local\\Temp\\pip-uninstall-67iq3cg9\\mne.exe
The permission errors is weird because I run the console as Administrator. After that I still get mne listed as available, and it seems to have been installed from conda-forge, not pip:
(mnedev) C:\src>conda list mne
# packages in environment at C:\Users\mmagn\Continuum\anaconda3\envs\mnedev:
#
# Name Version Build Channel
mne 0.24.1 hd8ed1ab_1 conda-forge
mne-qt-browser 0.1.7 pyhd8ed1ab_0 conda-forge
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Contributing guide — MNE 1.0.3 documentation
Now we'll remove the stable version of MNE-Python and replace it with the development version (the clone we just created with git).
Read more >pytorch/CONTRIBUTING.md at master - GitHub
In case you want to reinstall, make sure that you uninstall PyTorch first by running pip uninstall torch until you see WARNING: Skipping...
Read more >How to fix "The following module is missing from the file ...
Restore the module and actually disable and uninstall it (recommended if possible): First, restore the module to its original location in the file...
Read more >Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >This repository is configured for Git LFS but 'git-lfs' was not ...
I want to copy an existing local git repo; then push that copy to a newly created remote. But I get the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The permission error is expected,
pip
respects the permissions thatconda
sets and they are strict, so you (often? usually?) have to useconda
to remove things thatconda
installsIf you install mne with conda but want to upgrade, the easiest thing to do is to remove it with
conda uninstall --force mne
, the--force
will make it ignore the deps that will be angry about it (like mne-qt-gui), then you canpip install https://github.com/mne-tools/mne-python/zipball/main
for example and things should be fine@larsoner If the error is expected then Contributing Guide instructions should be modified, I followed them step by step. 😃