Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc issues: Installing a development environment #1380

Closed
woutdenolf opened this issue Aug 28, 2024 · 10 comments · Fixed by #1382
Closed

Doc issues: Installing a development environment #1380

woutdenolf opened this issue Aug 28, 2024 · 10 comments · Fixed by #1382

Comments

@woutdenolf
Copy link

https://mxcubeweb.readthedocs.io/en/latest/dev/environment.html

This is not a thing (see conda/conda#12313)

conda env create -f conda-environment.yml python=3.9

SpecNotFound: Invalid name 'python=3.9', try the format: user/package

I guess you can do this

conda create python=3.9 --name mxcubeweb
conda env update --name mxcubeweb --file conda-environment.yml

but it reverts to python 3.11 because

The following packages are incompatible
├─ nodejs 18.*|20.*  is installable with the potential options
│  ├─ nodejs [18.19.0|18.20.2|20.12.2|20.9.0] would require
│  │  └─ openssl >=3.2.1,<4.0a0 , which can be installed;
│  ├─ nodejs [18.20.3|20.12.2|...|22.5.1] would require
│  │  └─ openssl >=3.3.1,<4.0a0 , which can be installed;
│  ├─ nodejs 20.9.0 would require
│  │  └─ openssl >=3.1.4,<4.0a0 , which can be installed;
│  └─ nodejs [18.10.0|18.11.0|...|20.8.1], which can be installed;
├─ pnpm 9**  is installable with the potential options
│  ├─ pnpm [9.0.1|9.0.2|...|9.0.6] would require
│  │  └─ nodejs >=20.9.0,<21.0a0 , which can be installed (as previously explained);
│  ├─ pnpm [9.0.1|9.0.2|...|9.9.0] would require
│  │  └─ nodejs [>=18.19.0,<19.0a0 |>=18.20.2,<19.0a0 |>=20.12.2,<21.0a0 ], which can be installed (as previously explained);
│  └─ pnpm [9.4.0|9.5.0|...|9.9.0] would require
│     └─ nodejs [>=22.4.0,<23.0a0 |>=22.4.1,<23.0a0 |>=22.5.1,<23.0a0 |>=22.6.0,<23.0a0 ] with the potential options
│        ├─ nodejs [18.20.3|20.12.2|...|22.5.1], which can be installed (as previously explained);
│        └─ nodejs [22.6.0|22.7.0] would require
│           └─ openssl >=3.3.1,<4.0a0 , which can be installed;
└─ python 3.9  is not installable because it requires
   └─ openssl >=1.1.1h,<1.1.2a , which conflicts with any installable versions previously reported.

Missing package

conda install redis-server

The package authlib is not optional

Traceback (most recent call last):
  File "/home/denolf/dev/sb/mxcubeweb/mxcubeweb/__init__.py", line 123, in build_server_and_config
    mxcube.init(
  File "/home/denolf/dev/sb/mxcubeweb/mxcubeweb/app.py", line 296, in init
    _UserManagerCls = import_component(
                      ^^^^^^^^^^^^^^^^^
  File "/home/denolf/dev/sb/mxcubeweb/mxcubeweb/core/components/component_base.py", line 22, in import_component
    mod = importlib.import_module(_module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/users/denolf/.local/wdnbashutils/virtualenvs/mxcubeweb/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/denolf/dev/sb/mxcubeweb/mxcubeweb/core/components/user/usermanager.py", line 12, in <module>
    from authlib.integrations.flask_client import OAuth
ModuleNotFoundError: No module named 'authlib'
@fabcor-maxiv
Copy link
Contributor

fabcor-maxiv commented Aug 29, 2024

Thanks for the report @woutdenolf.

Seems like there are 3 separate issues in this ticket: 1. issue with environment creation for a specific Python version with conda, 2. missing redis-server, and 3. missing authlib. Is that right? If yes, do you mind opening 3 separate tickets? It will be easier to discuss without creating confusion.

@marcus-oscarsson
Copy link
Member

@woutdenolf Did you clone from GitHub or GitLab ?

@woutdenolf
Copy link
Author

GitLab.

@woutdenolf
Copy link
Author

do you mind opening 3 separate tickets

Ok. On gitlab or github?

@marcus-oscarsson
Copy link
Member

do you mind opening 3 separate tickets

Ok. On gitlab or github?

:), Ok it would perhaps be a good idea if I explain how we use GitLab and GitHub, ill give you a ring later.

  • So the issue you have with authlib comes from our internal ESRF GitLab repository and it have been fixed
  • The conda issue is clearly a general issue we should deal with that on GitHub
  • I'm a bit surprised that you have a dependency on redis-server, can you quickly check where it comes from ?

@woutdenolf
Copy link
Author

woutdenolf commented Aug 30, 2024

I'm a bit surprised that you have a dependency on redis-server

It's in the docs. No idea whether it is actually used or not:
https://mxcubeweb.readthedocs.io/en/latest/dev/environment.html#running-the-application-server

@marcus-oscarsson
Copy link
Member

Ah, thanks for spotting that !, its outdated now

@fabcor-maxiv
Copy link
Contributor

See this ticket #1383 to discuss the issue with creating the conda environment for Python3.8 or Python3.9.

@woutdenolf
Copy link
Author

I opened this issue for the conda command: #1384

@marcus-oscarsson
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants