Q: Virtualenv and django not working in bash on windows 10 I have a problem with using virtualenv and django in bash. If I type python -m venv env in cmd, then env\Scripts\activate, and then virtualenv - I get 'virtualenv' is not recognized as an internal or external command, operable program or batch file.. If I do the same in bash I get bash: virtualenv: command not found. How do I fix this?

A: Try the following to resolve your issue.

*

*Check all of the environment variables related to the software you require to be used at least.

*Check the permissions for files and folders for the software.

*Sometimes uninstalling and installing the software with issues can solve problems quickly.
If you have performed number 2. and you are still have errors, proceed to number 3.

*You may have dependencies missing, a good tool i have used on Windows is Dependency Walker, and the software will check if any file and dependencies are missing, and you should be able to download them.
An error message may output a file is not found but in fact a dependency is missing, relating to the software you are trying to run.


A: Try the following steps in the terminal, it may solve your problem.

*

*using terminal, mkdir to make a directory for your project


*cd to your project folder/dir


*type pip3 freeze, it will show up all the installed packages and dependencies on global scope/system


*but we gonna have a venv where we will install our necessary packages and dependencies


*type python3 -m venv ./venv to create venv inside your current project folder, please ensure you are inside the folder before running this command
[if you are not using python 3, then the command will be python -m venv ./venv]


*to actiavte environment,
on mac, run source ./venv/bin/activate ||
on windows, run .\venv\Scripts\activate.bat [if it doesn't work, try to put your absolute path]


*you can check what is installed inside venv using pip freeze, you will see nothing inside the venv


*Now you can install django inside venv for your project


*to deactivate the environment, just type deactivate
