The conda commands such as conda install <package> crash in Terminus cmd.exe terminal but not in a regular Windows 10 cmd.exe terminal. Thus, I do not think this is a conda issue, but one with Terminus interacting with the conda.bat script. Any ideas of what may be causing this problem?
See the following results from Terminus when I execute the command conda install sqlparse
Microsoft Windows [Version 10.0.18362.356]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\jnavarrete>conda activate test
(test) C:\Users\jnavarrete>conda install sqlparse
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test
added / updated specs:
- sqlparse
The following NEW packages will be INSTALLED:
sqlparse pkgs/main/noarch::sqlparse-0.3.0-py_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\exceptions.py", line 1074, in __call__
return func(*args, **kwargs)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
install(args, parser, 'install')
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\install.py", line 317, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\install.py", line 346, in handle_txn
unlink_link_transaction.execute()
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\link.py", line 244, in execute
self.verify()
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\link.py", line 231, in verify
exceptions = self._verify(self.prefix_setups, self.prefix_action_groups)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\link.py", line 591, in _verify
itervalues(prefix_action_groups)):
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\common\io.py", line 525, in map
yield func(thing)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\link.py", line 411, in _verify_individual_level
error_result = axn.verify()
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\path_actions.py", line 959, in verify
touch(user_environments_txt_file, mkdir=True, sudo_safe=True)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\gateways\disk\update.py", line 107, in touch
mkdir_p_sudo_safe(dirpath)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
[Previous line repeated 975 more times]
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 80, in mkdir_p_sudo_safe
base_dir = dirname(path)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\ntpath.py", line 184, in split
seps = _get_bothseps(p)
File "C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\lib\ntpath.py", line 35, in _get_bothseps
if isinstance(path, bytes):
RecursionError: maximum recursion depth exceeded while calling a Python object
`$ C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Scripts\conda-script.py install sqlparse`
environment variables:
CIO_TEST=<not set>
CONDA_BAT=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\condabin\conda.
bat
CONDA_DEFAULT_ENV=test
CONDA_EXE=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\condabin\..\Scr
ipts\conda.exe
CONDA_EXES="C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\condabin\..\Sc
ripts\conda.exe"
CONDA_PREFIX=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test
CONDA_PROMPT_MODIFIER=(test)
CONDA_PYTHON_EXE=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\python.exe
CONDA_ROOT=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3
CONDA_SHLVL=1
HOMEPATH=\
PATH=C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3;C:\Users\jnavar
rete\AppData\Local\Continuum\miniconda3\Library\mingw-w64\bin;C:\Users
\jnavarrete\AppData\Local\Continuum\miniconda3\Library\usr\bin;C:\User
s\jnavarrete\AppData\Local\Continuum\miniconda3\Library\bin;C:\Users\j
navarrete\AppData\Local\Continuum\miniconda3\Scripts;C:\Users\jnavarre
te\AppData\Local\Continuum\miniconda3\bin;C:\Users\jnavarrete\AppData\
Local\Continuum\miniconda3\envs\test;C:\Users\jnavarrete\AppData\Local
\Continuum\miniconda3\envs\test\Library\mingw-w64\bin;C:\Users\jnavarr
ete\AppData\Local\Continuum\miniconda3\envs\test\Library\usr\bin;C:\Us
ers\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test\Library\bi
n;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test\Scr
ipts;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test\
bin;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\condabin;C:
\Program Files (x86)\Intel\Intel(R) Management Engine
Components\iCLS;C:\Program Files\Intel\Intel(R) Management Engine Comp
onents\iCLS;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:
\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C
:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Fi
les\Git\usr\bin;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3
;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Library\mingw-
w64\bin;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Library
\usr\bin;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Librar
y\bin;C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Scripts;C
:\Users\jnavarrete\AppData\Local\Microsoft\WindowsApps;C:\Users\jnavar
rete\AppData\Local\hyper\app-3.0.2\resources\bin;C:\Users\jnavarrete\A
ppData\Local\Programs\Microsoft VS Code\bin;C:\Program
Files\JetBrains\DataGrip 2019.2.2\bin;.;
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
active environment : test
active env location : C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test
shell level : 1
user config file : X:\.condarc
populated config files :
conda version : 4.7.12
conda-build version : not installed
python version : 3.7.4.final.0
virtual packages :
base environment : C:\Users\jnavarrete\AppData\Local\Continuum\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\jnavarrete\AppData\Local\Continuum\miniconda3\pkgs
X:\.conda\pkgs
C:\Users\jnavarrete\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs
X:\.conda\envs
C:\Users\jnavarrete\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.
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?
[y/N]: y
Upload successful.
Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running
$ conda config --set report_errors true
Under a regular cmd.exe terminal, things works out fine. See the following results
(test) C:\Users\jnavarrete\Documents>conda install sqlparse
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\envs\test
added / updated specs:
- sqlparse
The following NEW packages will be INSTALLED:
sqlparse pkgs/main/noarch::sqlparse-0.3.0-py_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
I think I found a fix to this. The issue results from my cmd.exe default setting to open at a network drive location (X:\).
Setting a path under Settings --> Shell --> Working directory (C:\Users\jnavarrete) does not seem to provide a fix for Anaconda even though it does allow a new terminal to open under the new specified path.
My solution was actually pretty simple. I created a custom Profile (Settings --> Shell --> Saved Profiles) using the Anaconda Prompt settings. I looked at the properties of the Anaconda Prompt (which comes shipped with conda) and copied the Target argument.
I pasted the following to the custom profile in Terminus /k C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Scripts\activate.bat
The only remaining issue is that the title of each tab seems to change to the command arguments added to the custom profile.
I think this solution should be documented somewhere for other Python developers to reference.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks unless you comment.
Thank you for your contributions.
Most helpful comment
I think I found a fix to this. The issue results from my cmd.exe default setting to open at a network drive location (
X:\).Setting a path under Settings --> Shell --> Working directory (
C:\Users\jnavarrete) does not seem to provide a fix for Anaconda even though it does allow a new terminal to open under the new specified path.My solution was actually pretty simple. I created a custom Profile (Settings --> Shell --> Saved Profiles) using the Anaconda Prompt settings. I looked at the properties of the Anaconda Prompt (which comes shipped with conda) and copied the
Targetargument.I pasted the following to the custom profile in Terminus
/k C:\Users\jnavarrete\AppData\Local\Continuum\miniconda3\Scripts\activate.batThe only remaining issue is that the title of each tab seems to change to the command arguments added to the custom profile.
I think this solution should be documented somewhere for other Python developers to reference.