简体   繁体   中英

Python How to create virtual environment in Django?

I am new to Python and I'm following a tutorial which requires creating a virtual environment while creating a Python project,
But I am unable to create one for some reasons,
I am using the command -

mkvirtualenv djangoenv

But it displays -

bash: mkvirtualenv: command not found

Most recommended using PyCharm but, as I have work on JS as well, I wish to continue using VS Code

Following are the steps that I tried -

在此处输入图片说明

I checked, the virtualenvwrapper is installed on my machine - 在此处输入图片说明

My ~/.bash_profile file, looks like this -

在此处输入图片说明

在此处输入图片说明

I'd recommend looking at this answer for Mac users . Be sure that the $PATH is set before sourcing virtualenvwrapper.sh in your .bash_profile

It seems mkvirtualenv isn't installed on your system. First of all make sure you have python and pip installed then follow this instruction. https://pypi.org/project/virtualenvwrapper-win/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM