0

I'm Totally newb in Django! everytime I get error when I run workon

even I install workon module but it didn't help me whenever I run

python -m workon test 

it shows me

No module named workon! 

any solution? best regards Nafiz

  • Please add some output and detailed error description - you might want to post your console output and additional information regarding your installation. Do you use a [virtual environment](https://docs.python.org/3/tutorial/venv.html) or your used OS/Python/Django version. – xtlc May 05 '22 at 15:16

1 Answers1

0

You usually run workon to initialize a virtualenv. When you run python -m workon you are trying to run a python file inside a module or something similar (here is a good explanation on what it means: What is the purpose of the -m switch?). In your case, you are trying to run a python script/module named workon, which does not exist. If you are using virtualenvwrapper, you need to run workon name_of_your_virtualenv to initialize it, and then you will be able to run your python code if needed.

Next time please post your console output so we can help you better.