I’ve tried both suggested commands in a number of scenarios with no success:
- using Anaconda Prompt window as user with admin priv and as administrator
- using VSCode Powershell terminal again as user with admin priv and as admninstrator
Belowe is the session in the Anaconda prompt as user with admin priv, and noticed this error:
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: C:\ProgramData\Anaconda3
This occurred at my first attempt at installation:
------------------(Anaconda Prompt as user with administrator privleges.)----------------
(base) C:\Users\John>conda install -c conda-forge psutil
Collecting package metadata (current_repodata.json): done
Solving environment: done
Package Plan
environment location: C:\ProgramData\Anaconda3
added / updated specs:
- psutil
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.14.0 | py39hcbf5309_0 1.0 MB conda-forge
python_abi-3.9 | 2_cp39 4 KB conda-forge
-----------------------------------------------------------
Total: 1.0 MB
The following NEW packages will be INSTALLED:
python_abi conda-forge/win-64::python_abi-3.9-2_cp39
The following packages will be SUPERSEDED by a higher-priority channel:
conda pkgs/main::conda-4.14.0-py39haa95532_0 → conda-forge::conda-4.14.0-py39hcbf5309_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
python_abi-3.9 | 4 KB | ############################################################################ | 100%
conda-4.14.0 | 1.0 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: failed
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: C:\ProgramData\Anaconda3
On subsequent installation attempts, the commands return a message saying the package is already installed. I can import psutil as always in VSCode, but not with the Anaconda prompt.
Should I re-install the entire Anaconda/VScode software and start again? This problem started after I downloaded and installed the latest version of Anaconda.