How can I install Numba for Spyder?

81 views
Skip to first unread message

Fausto A. A. Barbuto

unread,
Nov 10, 2023, 11:50:30 PM11/10/23
to spyd...@googlegroups.com

Hello,

Spyder imported every library I tried so far, except Numba. An error 
pops out. Yet Numpy, Matplotlib and several other packages can be 
imported without problems. I also observed that Python's "regular" 
packages and Spyder's are installed on different locations. Example:

Python:
>>> import numpy
>>> numpy.__file__
'C:\\Program Files\\Python\\lib\\site-packages\\numpy\\__init__.py'

Spyder:
In [1]: import numpy

In [2]: numpy.__file__
Out[2]: 'C:\\Program Files\\Spyder\\pkgs\\numpy\\__init__.py'


And that's why (I think) Numba can't be imported: it simply does not 
exist in 'C:\\Program Files\\Spyder\\pkgs\\'

Hence my question: how could I install Numba for Spyder? Spyder's 
default Python interpreter does not come with pip.

I'm not using conda, and pointing Spyder to the Python interpreter in 
C:\Program Files\Python (with Tools/Preferences/Python Interpreter) 
did not work.

Thanks for any help you can provide.

Fausto




fausto....@gmail.com

unread,
Nov 12, 2023, 2:09:58 PM11/12/23
to spyder

Problem solved. I installed pip on C:\Program Files\Spyder with get_pip.py and installed numba 
easily with pip. Spyder had to be restarted though for the changes to take effect. Much simpler
than I thought. Thanks to everyone who cared to help. 

Fausto
Reply all
Reply to author
Forward
0 new messages