Installation problem with Hawthorn

Hi @nedbat,
I’m running into essentially the same issue. I’m attempting to install Hawthorn, and I’m using a Python 2.7.18 virtualenv.

I think something that would help is to know what the appropriate Python version(s) are required to best facilitate the installation process. I’m only trying 2.7.18 after attempts running Python 3.7.9 also caused issues.

++ docker-compose exec lms bash -c 'source /edx/app/edxapp/edxapp_env && cd     /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs'
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/bin/paver", line 11, in <module>
    sys.exit(main())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 890, in main
    _launch_pavement(args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 858, in _launch_pavement
    exec(compile(source, environment.pavement_file, 'exec'), mod.__dict__)
  File "pavement.py", line 14, in <module>
    from pavelib import *
  File "pavelib/__init__.py", line 6, in <module>
    from . import assets, bok_choy, database, docs, i18n, js_test, prereqs, quality, servers, tests
  File "pavelib/assets.py", line 24, in <module>
    from .utils.envs import Env
  File "pavelib/utils/envs.py", line 330
    file=sys.stderr,
        ^
SyntaxError: invalid syntax
Makefile:44: recipe for target 'dev.provision.run' failed
make: *** [dev.provision.run] Error 1'

@bilister I did the same thing but ran into this error.

Also logged this issue here: [PLAT-2467] Hawthorn install fails during provisioning - JIRA

Update: I’m running into the same provisioning issue running a 3.7.6 virtualenv. So far, I’ve tried 2.7.18, 3.7.9 and 3.7.6, and all have me stuck at the same error during provisioning. I would appreciate any help resolving this issue. And yes, I’m hoping to set up a Hawthorn devstack.

Creating edx.devstack.studio ... done
++ docker-compose exec lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs'
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/bin/paver", line 11, in <module>
    sys.exit(main())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 890, in main
    _launch_pavement(args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 858, in _launch_pavement
    exec(compile(source, environment.pavement_file, 'exec'), mod.__dict__)
  File "pavement.py", line 14, in <module>
    from pavelib import *
  File "pavelib/__init__.py", line 6, in <module>
    from . import assets, bok_choy, database, docs, i18n, js_test, prereqs, quality, servers, tests
  File "pavelib/assets.py", line 24, in <module>
    from .utils.envs import Env
  File "pavelib/utils/envs.py", line 330
    file=sys.stderr,
        ^
SyntaxError: invalid syntax
Makefile:44: recipe for target 'dev.provision.run' failed
make: *** [dev.provision.run] Error 1

Your edx-platform repo is not using Hawthorn code. You seem to be on master. I checked line 330 of pavelib/utils/envs.py, and it isn’t file=sys.stderr in Hawthorn, Ironwood, Juniper, or Koa. But it is on master.

Did you check out the open-release/hawthorn.master branch?

I faced the same issue, even though I set the OPENEDX_RELEASE environment variable to the appropriate image tag; “hawthorn.master”, it was not checking out the correct hawthorn.master edx-platform. Then manually I did the git checkout open-release/hawthorn.master inside edx-platform dir. problem solved!