ck
ck copied to clipboard
/cm/bin/python3: No module named pip
When I run the command
cm run script "app mlperf reference inference _bert-99 _offline _onnxruntime _cuda _fp32"
Traceback (most recent call last):
File "
CM error: Portable CM script failed (name = get-sys-utils-cm, return code = 256)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note that it may be a portability issue of a third-party tool or a native script wrapped and unified by this automation recipe (CM script). In such case, please report this issue with a full log at "https://github.com/mlcommons/ck". The CM concept is to collaboratively fix such issues inside portable CM scripts to make existing tools and native scripts more portable, interoperable and deterministic. Thank you!
It seems that cm is wrong.
You are using python from the virtual environment, right? Sometimes it gets broken and doesn't include pip.
Can you please run python3 -m pip --version
outside CM?
Usually it happens when your native python installation doesn't include pip and then, when you create virtual environment, it still doesn't include pip.
If it's the case, it should be possible to add support in CM to detect such cases and install pip from virtual environment (I think it's done by downloading a specific script to bootstrap pip .
But I would suggest to check your original python installation and install pip via apt install python3-pip
as described at https://github.com/mlcommons/ck/blob/master/docs/installation.md#ubuntu-debian .
Thank you for your consideration. This problem has been solved by the following steps: run the command to download the script called get-pip.py: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py run the script to download pip module: python get-pip.py
Thank you for your feedback @KingICCrab . I will keep this ticket open because, though this case that pip is not installed is rare, it still happens and maybe we can add these 2 commands to CM scripts to install pip if it's not detected ...