pythonimporterrorursina

Ursina not importing in python


I'm getting error:

Traceback (most recent call last):

  File "C:\Users\user\Downloads\blocky\main.py", line 1, in <module>
    import ursina as ue
ModuleNotFoundError: No module named 'ursina'

I tried:

pip install ursina

wait I also did

python -m pip install ursina


Solution

  • Since you're using import ursina as (custom name), you currently importing ursina as a local namespace and doing this will be annoying for most beginners. Example: (namespace).function()/PACKAGE CONTENT.function()

    I recommend that you use from ursina import * because this will extract everything and remove the need for namespace on every function/PACKAGE CONTENT.

    Example: function()/PACKAGE CONTENT.function()

    Also, try reinstalling python.