Corrupted conda cannot to channel - anaconda

My conda has been corrupted by some reasons....
When I try to update conda or to install a package this,
I have this message :
conda update conda
Error: HTTPError: 403 Forbidden http://repo.continuum.io/pkgs/pro/win-64/
My config of conda is:
C:\Windows\system32>conda info
Current conda install:
platform : win-64
conda version : 3.2.0a1
python version : 2.7.12.final.0
root environment : G:\_dev\anaconda27 (writable)
default environment : G:\_dev\anaconda27
envs directories : G:\_dev\anaconda27\envs
package cache : G:\_dev\anaconda27\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/pro/win-64/
config file : None
is foreign system : False
C:\Windows\system32>conda info -a
Current conda install:
platform : win-64
conda version : 3.2.0a1
python version : 2.7.12.final.0
root environment : G:\_dev\anaconda27 (writable)
default environment : G:\_dev\anaconda27
envs directories : G:\_dev\anaconda27\envs
package cache : G:\_dev\anaconda27\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/pro/win-64/
config file : None
is foreign system : False
# conda environments:
#
root * G:\_dev\anaconda27
sys.version: 2.7.12 |Anaconda 4.2.0 (64-bit)| (defaul...
sys.prefix: G:\_dev\anaconda27
sys.executable: G:\_dev\anaconda27\python.exe
conda location: G:\_dev\anaconda27\lib\site-packages\conda
conda-build: G:\_dev\anaconda27\Scripts\conda-build.exe
conda-convert: G:\_dev\anaconda27\Scripts\conda-convert.exe
conda-develop: G:\_dev\anaconda27\Scripts\conda-develop.exe
conda-index: G:\_dev\anaconda27\Scripts\conda-index.exe
conda-inspect: G:\_dev\anaconda27\Scripts\conda-inspect.exe
conda-metapackage: G:\_dev\anaconda27\Scripts\conda-metapackage.exe
conda-render: G:\_dev\anaconda27\Scripts\conda-render.exe
conda-server: G:\_dev\anaconda27\Scripts\conda-server.exe
conda-sign: G:\_dev\anaconda27\Scripts\conda-sign.exe
conda-skeleton: G:\_dev\anaconda27\Scripts\conda-skeleton.exe
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: <not set>
CONDA_ENVS_PATH: <not set>
PATH: G:\_dev\anaconda27\Library\bin;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Shield;G:\_dev\anaconda27;G:\_dev\anaconda27\Scripts;G:\_dev\anaconda27\Library\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;G:\app\emeditor;G:\_dev\googlesdk\google-cloud-sdk\bin
PYTHONPATH: <not set>
License directories:
C:\Users\aa\.continuum
C:\Users\aa\AppData\Roaming\Continuum
G:\_dev\anaconda27\licenses
License files (license*.txt):
Package/feature end dates:
How to repair a corrupted conda ?
Can I modify some files manually ?

Try to install Miniconda from https://repo.continuum.io/miniconda/Miniconda2-3.19.0-Windows-x86_64.exe.
Then you should be able to run conda update conda again.

Related

How do you debug using 'Code::Blocks 20.03' (the "mingw" version)?

I have built a Console Application using Code::Blocks 20.03, which was installed using codeblocks-20.03mingw-setup.exe. The defaults for the installation directory(see Note01) and the installation type (Full), were used.
I tried to Debug by using the Debug menu, clicking Start/Continue, and debugging failed.
I guess the important information from the log of what happened is
Starting the debuggee failed: No executable specified, use `target exec'
The full output from trying to debug is given below.
My question is, how do you debug using Code::Blocks 20.03 (the "mingw" version)?
Full Output from trying to run a debugging session follows.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding file: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\bin\Debug\program01INc.exe
Changing directory to: C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;\;C:\Program Files (x86)\clisp-2.49
Starting debuggee: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/bin/Debug/program01INc.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0
===============================
In building my project I used the defaults from the Select Compiler dialog box.
Note01:
It looks as if you should (date 11th April 2021) always use the default directory, to install. I installed a version of Code::Blocks in C:\Program Files\CodeBlocksSmall when I went to uninstall it, the uninstaller would only accept C:\Program Files\CodeBlocks as the directory to uninstall from. I deleted the CodeBlocksSmall directory manually. I noticed this behaviour when I installed using codeblocks-20.03-setup.exe.
Related question
Starting the debuggee failed: No executable specified, use `target exec'
=======================
It looks as if a prior installation of MinGW was inadvertently being used by the attempted debugging session(this is no longer possible). See the involvement of the file
C:\MinGW\bin\gdb.exe, in the line
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Now when I try to run a debugging session, failure occurs differently (see just after the next four lines).
It looks to me as if I need to at least to change the behaviour indicated by
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
to behaviour produced by
Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding file: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\bin\Debug\program01INcForAnswer.exe
Changing directory to: C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\clisp-2.49
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe
failed
Another related question is at
code blocks failed message runing hello code
There, the error message is like the one shown just above, and see also below
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe failed
Note that, in both cases, Code::Blocks is trying to invoke a debugger from the directory C:\MinGW\bin
To get debugging working, the type of fix described here wil be required if you install the MinGW version of Code::Blocks 20.03 on Windows, using codeblocks-20.03mingw-setup.exe ( the 8th April 2021 version, with the default installation accepted ).
What I did to get it to work was the following.
From the Settings menu I clicked on Debugger.., then on the left of the screen selected Default, a debugger type. This showed me Executable paths which was set to
C:\MinGW\bin\gdb.exe
I changed this to
C:\Program Files\Codeblocks\MinGW\bin\gdb.exe
I was then able to use the debugger.

PermissionError: [WinError 5] Access is denied pytest after conda install

PermissionError: [WinError 5] Access is denied - running pytest after fresh conda install
Environment
# packages in environment at C:\Users\rick\miniconda3\envs\xml:
#
# Name Version Build Channel
pytest 6.2.2 py39haa95532_2
(xml) c:\Users\rick>conda info
active environment : xml
active env location : C:\Users\rick\miniconda3\envs\xml
shell level : 2
user config file : C:\Users\rick\.condarc
populated config files : C:\Users\rick\.condarc
conda version : 4.9.2
conda-build version : not installed
python version : 3.9.2.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\rick\miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\rick\miniconda3\pkgs
C:\Users\rick\.conda\pkgs
C:\Users\rick\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\rick\miniconda3\envs
C:\Users\rick\.conda\envs
C:\Users\rick\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.9.2 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
(xml) c:\Users\rick>pytest
=================================================== test session starts ===================================================
platform win32 -- Python 3.9.2, pytest-6.2.2, py-1.9.0, pluggy-0.13.1
rootdir: c:\Users\rick
collected 0 items / 1 error
========================================================= ERRORS ==========================================================
______________________________________________ ERROR collecting test session ______________________________________________
miniconda3\envs\xml\lib\site-packages\_pytest\runner.py:311: in from_call
result: Optional[TResult] = func()
miniconda3\envs\xml\lib\site-packages\_pytest\runner.py:341: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
miniconda3\envs\xml\lib\site-packages\_pytest\main.py:690: in collect
for direntry in visit(str(argpath), self._recurse):
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:613: in visit
yield from visit(entry.path, recurse)
miniconda3\envs\xml\lib\site-packages\_pytest\pathlib.py:598: in visit
for entry in os.scandir(path):
E PermissionError: [WinError 5] Access is denied: 'c:\\Users\\rick\\AppData\\Local\\Application Data'
================================================= short test summary info =================================================
ERROR - PermissionError: [WinError 5] Access is denied: 'c:\\Users\\rick\\AppData\\Local\\Application Data'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 error in 2.35s =====================================================
From a Microsoft Technet post
The Application Data folder in that location is not a normal folder. It is a folder Junction and is normally hidden, by default. The only reason that the junction exists is to redirect legacy applications, that are hard coded to look for that folder, to the new location in Windows 7.
Seems odd that pytest would point to a deprecated "folder junction"? How to resolve?
pytest first tries to 'collect' tests - i.e. scans actual folder and its subfolders for python test files containing tests methods.
Looks like you've just installed (conda and) pytest and wanted to just try it, while being located at your os \users\rick folder, containing additional hidden\protected os folders which pytest lack permissions to access. I don't think pytest is deliberately trying to use this deprecated 'folder junction' ,it just happened to sit around your actual working folder at the moment. Running tests for real, you would know where to collect them, i.e. what folder to execute pytest from. For verify install only, run pytest from folder not containing any special os folders.
Collecting tests is also called 'test discovery' and can be parametrized and or configured, pytest docs touching the topic is here https://docs.pytest.org/en/7.0.x/explanation/goodpractices.html#test-discovery
)
Just run "pytest" from the directory you installed it or add it to the environmental variables.
In your example: >cd miniconda3\envs\xml\lib\site-packages_pytest

Error When Activating Conda Environment Windows 10

I just installed Anaconda3 and when I open the Anaconda command prompt, it shows me this error:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\cli\main.py", line 138, in main
return activator_main()
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 996, in main
print(activator.execute(), end='')
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 180, in execute
return getattr(self, self.command)()
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 154, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 288, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 314, in _build_activate_stack
conda_prompt_modifier = self._prompt_modifier(prefix, conda_default_env)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 639, in _prompt_modifier
name=basename(prefix),
KeyError: 'openSim'
`$ C:\Users\owner\Anaconda3\Scripts\conda-script.py shell.cmd.exe activate C:\Users\owner\Anaconda3`
environment variables:
CIO_TEST=<not set>
CONDA_BAT=C:\Users\owner\Anaconda3\condabin\conda.bat
CONDA_EXE=C:\Users\owner\Anaconda3\condabin\..\Scripts\conda.exe
CONDA_ROOT=C:\Users\owner\Anaconda3
CONDA_SHLVL=0
GIT_LFS_PATH=C:\Program Files\Git LFS
HOMEPATH=\Users\owner
PATH=C:\Users\owner\Anaconda3;C:\Users\owner\Anaconda3\Library\mingw-w64\bi
n;C:\Users\owner\Anaconda3\Library\usr\bin;C:\Users\owner\Anaconda3\Li
brary\bin;C:\Users\owner\Anaconda3\Scripts;C:\Users\owner\Anaconda3\bi
n;C:\Users\owner\Anaconda3\condabin;C:\Users\owner\Documents\R\win-
library\3.3\Rtools\bin;C:\Program Files (x86)\Common
Files\Oracle\Java\javapath;C:\Program Files
(x86)\STMicroelectronics\st_toolset\asm;C:\Program Files
(x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOW
S\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Win
dowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management
Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management
Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management
Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management
Engine Components\IPT;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft
SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL
Server\120\Tools\Binn\;C:\Users\owner\.dnx\bin;C:\Program
Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program
Files\doxygen\bin;C:\Program Files\PuTTY\;C:\Program Files\Git
LFS;C:\Program Files\Git\cmd;C:\Program
Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\WINDOWS\System32
\OpenSSH\;C:\Users\owner\Documents\Libraries\gradle-4.10.2\bin;C:\Andr
oid;C:\Windows\System32;C:\Users\owner\Anaconda3;C:\Users\owner\Anacon
da3\Scripts;C:\Users\owner\Anaconda3\Library\bin;C:\OpenSim 3.3\bin;C:
\Users\owner\Anaconda3;C:\Users\owner\Anaconda3\Library\mingw-w64\bin;
C:\Users\owner\Anaconda3\Library\usr\bin;C:\Users\owner\Anaconda3\Libr
ary\bin;C:\Users\owner\Anaconda3\Scripts;C:\Users\owner\AppData\Local\
Microsoft\WindowsApps;C:\Program Files (x86)\FCIV;C:\Users\owner\AppDa
ta\Roaming\npm;C:\Users\owner\Downloads\swigwin-3.0.12\swigwin-3.0.12\
;C:\Users\owner\AppData\Local\Google\Cloud SDK\google-cloud-
sdk\bin;MSVCP140.DLL;C:\Users\owner\AppData\Local\Programs\Microsoft
VS Code\bin;C:\flutter\bin;C:\Users\owner\AppData\Local\Android\Sdk\to
ols;C:\Users\owner\AppData\Local\Android\Sdk\platform-
tools;C:\Users\owner\AppData\Local\Android\Sdk\build-
tools\28.0.3;C:\Users\owner\AppData\Roaming\Pub\Cache\bin;C:\Program
Files (x86)\Microsoft Visual Studio\Installer
PROTOC_PATH=C:\Users\owner\Documents\Libraries\protobuf-3.3.0\src\protoc\Debug\pro
toc.exe
PSMODULEPATH=;C:\Users\owner\AppData\Local\Google\Cloud SDK\google-cloud-
sdk\platform\PowerShell
PYTHONIOENCODING=UTF-8
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
shell level : 0
user config file : C:\Users\owner\.condarc
populated config files : C:\Users\owner\.condarc
conda version : 4.7.12
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages :
base environment : C:\Users\owner\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\owner\Anaconda3\pkgs
C:\Users\owner\.conda\pkgs
C:\Users\owner\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\owner\Anaconda3\envs
C:\Users\owner\.conda\envs
C:\Users\owner\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
A similar error happens if I try to create a new environment and activate it. Any hint on what could be causing it? I see that that it's complaining about KeyError: 'openSim'. But I'm not sure what could be the root cause. The error message is not very explicit or at least I couldn't get anything from it.
I tried uninstalling Anaconda and OpenSim and installing them again with no luck in resolving the issue. Any hint is appreciated.
I found the solution to the problem which is so random that I thought I share it here. It's not easy (almost impossible) to figure out.
It looked like some configurations were cached and had to be manually deleted since even a fresh install of anaconda didn't resolve the issue.
I had to delete .condarc file in the anaconda directory to solve this issue.
For more info read this.

Creating conda environment from .yml file - Error Report

I am trying to create a conda environment from .yml file. I am using Miniconda3, python 3.7.3 on Windows. I receive the following error report. Any ideas what could cause such a problem?
PS. I apologise if the question is not appropriate.
Traceback (most recent call last):
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda\exceptions.py", line 1003, in __call__
return func(*args, **kwargs)
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\cli\main.py", line 73, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\cli\main_update.py", line 69, in execute
directory=os.getcwd())
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\specs\__init__.py", line 40, in detect
if spec.can_handle():
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\specs\yaml_file.py", line 18, in can_handle
self._environment = env.from_file(self.filename)
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\env.py", line 143, in from_file
return from_yaml(yamlstr, filename=filename)
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\env.py", line 129, in from_yaml
data = validate_keys(data, kwargs)
File "C:\Users\mariyana\Miniconda3\lib\site-packages\conda_env\env.py", line 34, in validate_keys
for key in data.keys():
AttributeError: 'NoneType' object has no attribute 'keys'
`$ C:\Users\mariyana\Miniconda3\Scripts\conda-env-script.py update --file spikesorting.yml`
environment variables:
CIO_TEST=<not set>
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=spikesorting
CONDA_EXE=C:\Users\mariyana\Miniconda3\condabin\..\Scripts\conda.exe
CONDA_EXES="C:\Users\mariyana\Miniconda3\condabin\..\Scripts\conda.exe"
CONDA_PREFIX=C:\Users\mariyana\Miniconda3\envs\spikesorting
CONDA_PREFIX_1=C:\Users\mariyana\Miniconda3
CONDA_PROMPT_MODIFIER=(spikesorting)
CONDA_PYTHON_EXE=C:\Users\mariyana\Miniconda3\python.exe
CONDA_ROOT=C:\Users\mariyana\Miniconda3
CONDA_SHLVL=2
HOMEPATH=\Users\mariyana
PATH=C:\Users\mariyana\Miniconda3;C:\Users\mariyana\Miniconda3\Library\ming
w-w64\bin;C:\Users\mariyana\Miniconda3\Library\usr\bin;C:\Users\mariya
na\Miniconda3\Library\bin;C:\Users\mariyana\Miniconda3\Scripts;C:\User
s\mariyana\Miniconda3\bin;C:\Users\mariyana\Miniconda3\envs\spikesorti
ng;C:\Users\mariyana\Miniconda3\envs\spikesorting\Library\mingw-w64\bi
n;C:\Users\mariyana\Miniconda3\envs\spikesorting\Library\usr\bin;C:\Us
ers\mariyana\Miniconda3\envs\spikesorting\Library\bin;C:\Users\mariyan
a\Miniconda3\envs\spikesorting\Scripts;C:\Users\mariyana\Miniconda3\en
vs\spikesorting\bin;C:\Users\mariyana\Miniconda3\condabin;C:\ProgramDa
ta\Oracle\Java\javapath;C:\Program Files\Haskell\bin;C:\Program
Files\Haskell Platform\7.10.2-a\lib\extralibs\bin;C:\Program
Files\Haskell Platform\7.10.2-a\bin;C:\Program Files
(x86)\Lenovo\FusionEngine;C:\Program Files (x86)\Intel\iCLS
Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDO
WS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0
;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-
Static;C:\Program Files\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common
Files\Intel\WirelessCommon;C:\Program Files (x86)\Common
Files\lenovo\easyplussdk\bin;C:\emacs-24.5\bin;C:\Program
Files\Haskell Platform\7.10.2-a\mingw\bin;C:\Program Files
(x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program
Files\Microsoft SQL Server\130\Tools\Binn;C:\Program
Files\Git\cmd;C:\Program Files (x86)\Skype\Phone;C:\Program
Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\PuTTY;C:\Program Files (x86)\Heimdal\bin;C:\Program
Files\Heimdal\bin;C:\Program Files\Secure
Endpoints\NetIDMgr;C:\Program Files\MATLAB\R2018b\bin;C:\Users\mariyan
a\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\mariyana\
AppData\Local\Programs\Python\Python37-32;C:\Users\mariyana\AppData\Lo
cal\Programs\Python\Python35\Scripts;C:\Users\mariyana\AppData\Local\P
rograms\Python\Python35;C:\Users\mariyana\AppData\Roaming\cabal\bin;C:
\Users\mariyana\AppData\Local\Microsoft\WindowsApps;C:\Users\mariyana\
AppData\Local\Google\Cloud SDK\google-cloud-
sdk\bin;C:\Users\mariyana\AppData\Roaming\npm;.
PSMODULEPATH=;C:\Users\mariyana\AppData\Local\Google\Cloud SDK\google-cloud-
sdk\platform\PowerShell
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : spikesorting
active env location : C:\Users\mariyana\Miniconda3\envs\spikesorting
shell level : 2
user config file : C:\home\.condarc
populated config files :
conda version : 4.6.14
conda-build version : not installed
python version : 3.7.3.final.0
base environment : C:\Users\mariyana\Miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\mariyana\Miniconda3\pkgs
C:\home\.conda\pkgs
C:\Users\mariyana\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\mariyana\Miniconda3\envs
C:\home\.conda\envs
C:\Users\mariyana\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.14 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
This can happen when your environment yaml file is broken or empty. I ran into the same issue and noticed that while playing around with conda, the content of my environment.yml got deleted. Therefore, the for loop in env.py fails due to a None object.

How to deal with "[Errno 122] Disk quota exceeded" problem when creating new environment by anaconda?

I am trying to create a new environment for Python through Anaconda. But the error keeps coming out saying :
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
OSError: [Errno 122] Disk quota exceeded
I am using the sentence below to create the new environment:
conda create --name cpost python=2.7 numpy=1.9
I understand that this might be related to the working directory, which is really limited in disk quota. So I copied the Anaconda directory fully to a larger disk-quota directory, and tried to create again. The same error came out. As I checked the error information, I noticed the following lines:
$ /nuist/u/home/liangxz/anaconda3/bin/conda create --name cpost python=2.7 numpy=1.9`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/nuist/u/home/liangxz/anaconda3
MODULEPATH=/nuist/p/public/app/Modules/modulefiles/app:/nuist/p/public/app/Module
s/modulefiles/compiler:/nuist/p/public/app/Modules/modulefiles/lib:/nu
ist/p/public/app/Modules/modulefiles/mpi
PATH=/nuist/u/home/liangxz/anaconda3/bin:/nuist/p/public/intel/compilers_an
d_libraries_2018.0.128/linux/bin/intel64:/nuist/p/public/intel/compile
rs_and_libraries_2018.0.128/linux/mpi/intel64/bin:/nuist/p/public/pgi/
linux86-64/17.10/bin:/nuist/p/public/pgi/linux86-64/17.10/bin:/opt/xca
t/bin:/opt/xcat/sbin:/opt/xcat/share/xcat/tools:/usr/lib64/qt-3.3/bin:
/opt/confluent/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
opt/ibutils/bin:/usr/lpp/mmfs/bin:/root/bin:/opt/pbs/default/bin:/nuis
t/u/home/liangxz/.local/bin:/nuist/u/home/liangxz/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
user config file : /nuist/u/home/liangxz/.condarc
populated config files :
conda version : 4.5.4
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : /nuist/u/home/liangxz/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /nuist/u/home/liangxz/anaconda3/pkgs
/nuist/u/home/liangxz/.conda/pkgs
envs directories : /nuist/u/home/liangxz/anaconda3/envs
/nuist/u/home/liangxz/.conda/envs
platform : linux-64
user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/3.10.0-514.el7.x86_64 centos/7 glibc/2.17
UID:GID : 1135:1135
netrc file : None
offline mode : False
I realized that the "user config file" is /nuist/u/home/liangxz/.condarc, and the "base environment" is "/nuist/u/home/liangxz/anaconda3 (writable)", which means even I copied an anaconda to a larger quota directory, the "writable directory" did not change and remained the small quota directory.(/nuist/u/home/liangxz/ is the small quota directory)
So my question here is how can I change the "base environments" and "envs directories" to the desired larger quota directory? Can I change it directly through some fixings? Or I must install Anaconda again in the bigger directory?
Try following this official anaconda answer that enables adding different directories as your conda cache. I added a different directory where I had more space available and it solved the issue.
I solved this by deleting some of my conda environments. You can find all environments by typing conda env list in the terminal. This will show all environments with their names and paths. Select an environment that you are prepared to remove and type: rm -r <<Path to that environment>>.
Warning: This will delete that environment permanently, so choose wisely.

Resources