Error while installing Devstack for juniper.master version on local machine

I am installing Open-edx devstack for juniper.master but getting the following error after running the command make dev.provision.

++ docker-compose -f docker-compose.yml -f docker-compose-host.yml -f docker-compose-themes.yml -f docker-compose-watchers.yml -f docker-compose-xqueue.yml -f docker-compose-analytics-pipeline.yml -f docker-compose-marketing-site.yml exec -T lms bash -c ‘source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs’
—> pavelib.prereqs.install_prereqs
—> pavelib.prereqs.install_node_prereqs
audited 1855 packages in 105.176s
found 2490 vulnerabilities (1338 low, 58 moderate, 1091 high, 3 critical)
run npm audit fix to fix them, or npm audit for details
Successfully installed NPM packages. Log found at /edx/app/edxapp/edx-platform/test_root/log/npm-install.log
—> pavelib.prereqs.install_python_prereqs
—> pavelib.prereqs.uninstall_python_packages
NO_PYTHON_UNINSTALL is set. No attempts will be made to uninstall old Python libs.
pip install -q --disable-pip-version-check --exists-action w -r requirements/edx/development.txt
WARNING: Generating metadata for package ratelimit produced metadata for project name django-ratelimit. Fix your #egg=ratelimit fragments.
WARNING: Generating metadata for package pystache-custom-dev produced metadata for project name pystache-custom. Fix your #egg=pystache-custom-dev fragments.
ERROR: Command errored out with exit status 1:
command: /edx/app/edxapp/venvs/edxapp/bin/python3.5 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-scqky06s/bridgekeeper/setup.py’"’"’; file=’"’"’/tmp/pip-install-scqky06s/bridgekeeper/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base /tmp/pip-install-scqky06s/bridgekeeper/pip-egg-info
cwd: /tmp/pip-install-scqky06s/bridgekeeper/
Complete output (31 lines):
ERROR: Package ‘setuptools-scm’ requires a different Python: 3.5.2 not in ‘>=3.6’
Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/installer.py”, line 126, in fetch_build_egg
subprocess.check_call(cmd)
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/edx/app/edxapp/venvs/edxapp/bin/python3.5’, ‘-m’, ‘pip’, ‘–disable-pip-version-check’, ‘wheel’, ‘–no-deps’, ‘-w’, ‘/tmp/tmph_9tpo_w’, ‘–quiet’, ‘setuptools_scm>=1.11.1’]’ returned non-zero exit status 1
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-scqky06s/bridgekeeper/setup.py”, line 30, in
‘console_scripts’: [‘bridgekeeper=bridgekeeper.cli:main.start’],
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/init.py”, line 152, in setup
_install_setup_requires(attrs)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/init.py”, line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/dist.py”, line 676, in fetch_build_eggs
replace_conflicting=True,
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/pkg_resources/init.py”, line 766, in resolve
replace_conflicting=replace_conflicting
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/pkg_resources/init.py”, line 1049, in best_match
return self.obtain(req, installer)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/pkg_resources/init.py”, line 1061, in obtain
return installer(requirement)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/dist.py”, line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/setuptools/installer.py”, line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command ‘[’/edx/app/edxapp/venvs/edxapp/bin/python3.5’, ‘-m’, ‘pip’, ‘–disable-pip-version-check’, ‘wheel’, ‘–no-deps’, ‘-w’, ‘/tmp/tmph_9tpo_w’, ‘–quiet’, ‘setuptools_scm>=1.11.1’]’ returned non-zero exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Captured Task Output:
------------------------> pavelib.prereqs.install_prereqs
—> pavelib.prereqs.install_node_prereqs
—> pavelib.prereqs.install_python_prereqs
—> pavelib.prereqs.uninstall_python_packages
pip install -q --disable-pip-version-check --exists-action w -r requirements/edx/development.txt
Build failed running pavelib.prereqs.install_prereqs: Subprocess return code: 1
Makefile:123: recipe for target ‘dev.provision.services’ failed
make: *** [dev.provision.services] Error 1

Python version 3.6.8 used using the Python virtualenv

Referred steps on GitHub - edx/devstack: Get up and running quickly to develop or extend Open edX services

Hello @Piyush_Nikam,

Follow the below steps to resolve the error:

  1. Open LMS shell: make lms-shell
  2. Move or delete this file: rm /root/.pip/pip.conf
  3. Install setuptools_scm: pip install setuptools_scm

Follow the same in make studio-shell and then you can do make dev.provision.services.

This approach helped me to figure out the same in my installation today, hope this will work for you though I was not able to find the root cause behind this (due to lack of time).

Reference for devpi:

1 Like

@jramnai This methods worked! Thanks for posting here. I was trying to reprovision studio because the MFE wasn’t loading for some reason. Appreciate this support quick patch.

1 Like

@jramnai Thank you very much! :hugs: