Closed thomascatlee closed 5 years ago
Well, I was able to tinker around and reproduce something like this, but I don't have a fix yet. It seems like build-python's version of pip isn't getting installed correctly.
Depending on what you need to you, you might be able to work around it by passing --without-cross-pip to crossenv. You'll need to build packages with python setup.py ...
instead of pip install ...
, and you may have to build dependencies manually, but hopefully that can get you somewhere while I work on this.
I have a lightly tested fix in the master branch. The issue stems from patches made to the system installed version of Python that aren't present in stock Python. For this reason, and to make sure that build-python and host-python are really the same, I still recommend that you build Python from source and use that rather than the system installed version.
I modified init.py to bypass the error. Using context.build_env_exe rather than cross_env_exe
subprocess.check_output([context.build_env_exe, '-m', 'pip',
'--disable-pip-version-check',
'install',
'--ignore-installed',
'--prefix='+context.cross_env_dir] + reqs)
But I don't think this is the right way.
python -m crossenv /home/lx/platform3798C/pub/hi3798cv200/rootbox/usr/bin/python3.5 hisi_python --system-site-packages
the cross/bin/python is a py file, that convert PATH between BUILD and HOST, I tested with test.py
it works. But when I use crosspython as a Interpreter and just import pip, the ImportError message was the same. And
crosspython -m python
error in the same way.