Help Center> ModelArts> Troubleshooting> DevEnviron> Environment Configuration Faults> The numba Library Has Been Installed in a Notebook Instance and Error "import numba ModuleNotFoundError: No module named 'numba'" Is Reported
Updated on 2024-04-30 GMT+08:00

The numba Library Has Been Installed in a Notebook Instance and Error "import numba ModuleNotFoundError: No module named 'numba'" Is Reported

Symptom

After you install the numba library in a notebook instance by running the !pip install numba command, the library is running properly and is saved as a custom image. However, an error is reported indicating that the library does not exist when you run the script in DataArts Studio.

Possible Causes

Multiple virtual environments are created and the numba library is installed in python-3.7.10, as shown in Figure 1.

Figure 1 Querying virtual environments

Solution

Run the conda deactivate command in Termina to exit the current virtual environment and enter the default base environment. Run the pip list command to query the installed packages. Install and save the required dependencies, switch to the specified virtual environment, and run the script.