3

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

Tanay
  • 561
  • 1
  • 3
  • 16
Srinivasan
  • 35
  • 6

5 Answers5

1

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.

BrentG
  • 26
  • 4
0

Try using pipwin. First do

pip install pipwin,

Then do pipwin install ursina

Dharman
  • 30,962
  • 25
  • 85
  • 135
0

You must have any other libraries installed in the same virtual environment or the default, that causes conflict with 'ursina'

Try store the libraries u use in the project in a new empty virtual environment


1, Install https://pypi.org/project/virtualenv/

 pip install virtualenv

2, Create a new folder for your environment (by convention it is advisable to call it venv.) locate the folder with the console

source /python -m virtualenv .

3, Active (to deactivate it would be the same but in the end it is placed deactivate.)

-- in Windows

 source /venv/Scripts/activate 

-- in Linux

 source /venv/bin/activate 

the name of the virtual environment will appear at the beginning of the line in the command terminal, (venv in this case).

4, To see the packages that we have installed in our virtual environment we execute the following command:

(venv) source  /pip list

5, install 'ursina' n all the libs u need

(venv) source  /pip install ursina

0

If you can't install ursina (neither one option from above worked), just download the GitHub repository and import ursina from there. You will need to put the folder inside your project directory.

Lixt
  • 201
  • 4
  • 19
-1

use this instead

from ursina import *

app= Ursina()
(code)
app.run()

this will help your issue

csabinho
  • 1,579
  • 1
  • 18
  • 28
Coop Good
  • 11
  • 4