rs-station / careless

Merge X-ray diffraction data with Wilson's priors, variational inference, and metadata
MIT License
16 stars 6 forks source link

prompt-toolkit version incompatibility #115

Closed DHekstra closed 1 year ago

DHekstra commented 1 year ago

When setting up a new conda env for Careless, I encountered the following error:

pkg_resources.ContextualVersionConflict: (prompt-toolkit 3.0.20 (/n/home12/dhekstra/miniconda3/envs/careless-10a/lib/python3.10/site-packages), Requirement.parse('prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30'), {'ipython'}) I seem to have this error by

  1. pip install prompt-toolkit==3.0.31 (in my case)
  2. removing prompt_toolkit folders with different/no version numbers in the site-packages directory referenced in the error message.
DHekstra commented 1 year ago

That was sufficient for some functions (careless.cchalf for example) but not to run Careless without error. The new error contained ModuleNotFoundError: No module named 'chardet'. By also doing pip install -U --force-reinstall charset-normalizer, I was able to run Careless with only a warning.

NOTE: I do not understand what is wrong with this install, but a clean conda environment with fresh install resolved the issues completely.

DHekstra commented 1 year ago

For completeness, the remaining error read:

/(...)/envs/careless-10a/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.1.0) doesn't match a supported version! warnings.warn(