FAQ#

pip errors#

Q: pip can’t install anything

If the machine running the code is in the Nokia Intranet/VPN (e.g., lambdav2.nbl.nsn-rdnet.net), it is strongly advised to add the following lines to the end of your ~/.bashrc.

export http_proxy="http://10.158.100.3:8080"
export https_proxy="$http_proxy"

Restart your shell, and run:

pip config set global.proxy $http_proxy

Q: pip install -v ... hangs

This problem is reported in this thread. To fix it, add the following lines to the end of your ~/.bashrc.

# If pip install -v freezes, see: https://unix.stackexchange.com/a/635597
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

poetry errors#

Q: poetry install hangs

Check whether you can install the impacted dependencies using pip install -v .... If this command also hangs, see the corresponding item in this FAQ.

Q: poetry install is very slow (e.g., in the CI)

It occurs if some dependencies must be recompiled. This is especially a problem for large package (like numpy). It is advised to constrain pyproject.toml so that the package only rely on binaries well.

Example:

[tool.poetry.dependencies
numpy = [
    {version = ">=1.26.1", python = ">=3.9"},
    {version = "*", python = "<3.9"}
]

CUDA#

Q: I get CUDA error: CUBLAS_STATUS_NOT_INITIALIZED

This error is reported in pytorch forum. It occurs when no GPU is available. In practice, this is often because the GPU that you are about to use is already in use. If your machine has several GPUs, you could probably just use another one.

  • You can monitor which GPU are in use thanks to:

nvidia-smi
  • To run my_command on GPU 1, run:

CUDA_VISIBLE_DEVICES=1 my_command