添加开发包,构建并运行开发服务器:
- "PYTHON_VER is python3.7.">
- "Python 3模块安装通过pip">
- "SYS_PYTHON是/root/.pyenv/shims/python3.7.">
- "ENV_PYTHON is/data/opt/hue/hue/build/env/bin/python3.7.">
添加到~/.bashrc
export PYTHON_VER=python3.7
然后
git clone https://github.com/cloudera/hue.git
cd hue
make apps
/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py:19: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
"Distutils was imported before Setuptools, but importing Setuptools "
/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Exception:
Traceback (most recent call last):
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/setuptools/__init__.py", line 8, in <module>
import _distutils_hack.override # noqa: F401
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/override.py", line 1, in <module>
__import__('_distutils_hack').do_override()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py", line 77, in do_override
ensure_local_distutils()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py", line 64, in ensure_local_distutils
assert '_distutils' in core.__file__, core.__file__
AssertionError: /root/.pyenv/versions/3.7.0/lib/python3.7/distutils/core.py
Answer1
pip3 install --upgrade pip setuptools
Answer2
pip uninstall pyzmq
# then
pip install pyzmq
它不工作,你知道吗?
为我修复
/usr/bin/python3 -m pip install --user --upgrade pip setuptools --disable-pip-version-check
链接:
https://discuss.pixls.us/t/latest-version-install-script-errors-on-installation/28479/2