CSD Portfolio fails to install the CSD Python API on Windows

Modified on Thu, 20 Feb at 10:27 AM

One reason why the API may fail to install is due to a bug with the miniconda install that we use. To determine if this is the cause of the issue, open up the InstallationLog.txt file in the CCDC installation directory and search for the phrase "recursion depth". It this reveals an error section alike

Traceback (most recent call last):
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\exceptions.py", line 1074, in _call_
return func(*args, **kwargs)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\cli\main_install.py", line 20, in execute
install(args, parser, 'install')
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\cli\install.py", line 317, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\cli\install.py", line 346, in handle_txn
unlink_link_transaction.execute()
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\core\link.py", line 244, in execute
self.verify()
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\core\link.py", line 231, in verify
exceptions = self._verify(self.prefix_setups, self.prefix_action_groups)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\core\link.py", line 591, in _verify
itervalues(prefix_action_groups)):
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\common\io.py", line 525, in map
yield func(thing)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\core\link.py", line 411, in _verify_individual_level
error_result = axn.verify()
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\core\path_actions.py", line 959, in verify
touch(user_environments_txt_file, mkdir=True, sudo_safe=True)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\gateways\disk\update.py", line 107, in touch
mkdir_p_sudo_safe(dirpath)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\gateways\disk_init_.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\gateways\disk_init_.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\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:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\site-packages\conda\gateways\disk_init_.py", line 80, in mkdir_p_sudo_safe
base_dir = dirname(path)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\ntpath.py", line 184, in split
seps = _get_bothseps(p)
File "C:\PROGRA~1\CCDC\PYTHON~1\MINICO~1\lib\ntpath.py", line 35, in _get_bothseps
if isinstance(path, bytes):
RecursionError: maximum recursion depth exceeded while calling a Python object


then it is likely that you are running into this bug, which is related to erroneous settings of user home environment variables. If you have the error, check your system and user environment variables for HOME entries and ensure they are correct (or removed if not used elsewhere).

If the problem persists, a workaround is to manually install the pip CSD Python API packages, rather than using the conda packages that the CSD Portfolio installer contains.

a) Download the pip package for Windows from the links available to you

b) Start an administrative command line prompt (type cmd in the start menu and right-click to open a command line prompt as administrator)

c) Run

"%USERPROFILE%\CCDC\ccdc-software\csd-python-api\miniconda\Scripts\activate"

(where the location is the actual location of the csd-python-api folder on your system)

then

"%USERPROFILE%\CCDC\ccdc-software\csd-python-api\miniconda\Scripts\pip" install "<path-to>\csd-python-api-X.Y.Z-py311-none-win_amd64.whl"

(where <path-to> is the location of the file you downloaded in step 1, and X.Y.Z is the version for this release, e.g. 3.3.1).

If you have other modules available in addition to the base CSD Python API package, these can then be installed in the same manner.


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article