No video

How to Use venv to Create Virtual Environments in Python 3 (multiple versions)

  Рет қаралды 40,908

Tony Teaches Tech

Tony Teaches Tech

Күн бұрын

Пікірлер: 78
@c0kain361
@c0kain361 3 жыл бұрын
Literally the best tutorial I have found. Started reading black hat python 2nd ed and this expanded on the first chapter so much more. Thank you!!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks so much!!
@EdwardAmarh-01
@EdwardAmarh-01 3 жыл бұрын
Hey God bless you. This really was straight forward and understandable. I loved every bit of this tutorial
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks Eward, happy to hear that!
@hemanthsaji3606
@hemanthsaji3606 Жыл бұрын
Amazing tutorial Tony. Straightforward and clear. I have a question. If we install a Python library only in a particular Virtual environment and if we make a script using modules in that library and make that script executable can I run it without Virtual environment in my regular home directory. Do I need to always run that particular script in virtual environment ?
@aasthavarma2977
@aasthavarma2977 2 жыл бұрын
This really was crystal clear. Loved it !!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks!
@ffhhffh
@ffhhffh 2 жыл бұрын
Straight and to the point. Thank you!
@uAreMyComputer
@uAreMyComputer 3 жыл бұрын
very easy very short and simple explain thank !
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You are welcome!
@hassanrisvy3947
@hassanrisvy3947 2 жыл бұрын
Guys don't forget to Install virtual environment packages first. For python 3.7 (or any 3.x): sudo apt-get install python3.7-dev python3.7-venv
@Remiisola
@Remiisola Жыл бұрын
MEGA thanks for sharing this. You saved my day :}
@eclipsedegazpach7066
@eclipsedegazpach7066 Жыл бұрын
Ok, but you already had different versions of python living in your system, a missing piece of info is how do you manage to download and hold those diff versions without getting into conflict with your global ver of python
@jarodmorris4408
@jarodmorris4408 11 ай бұрын
I am not going to install a different version of python on my VPS because it could break my entire VPS. How do you install a version of python in JUST your venv?
@AbdulKareemAbdulRahman
@AbdulKareemAbdulRahman Жыл бұрын
how would one upgrade the phyton in a virt environment? thanks? for instance my system wide python says it is 3.11.3 but my venv says it is 3.7. wld be grateful for any help or signposting
@apocalypseb7x
@apocalypseb7x Жыл бұрын
Very useful, thanks for sharing!
@enricofr7079
@enricofr7079 3 жыл бұрын
thank you, this is very helpful... i always use anaconda to make venv and dont know how to make it manually coz im moving to manjaro
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome!
@slayer_dan
@slayer_dan Жыл бұрын
cleared my thoughts, thank you
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Good!
@ldELuxEl
@ldELuxEl 2 жыл бұрын
Pls help... I accidentally changed python version for my environment. What is the best way to revert to previous python version?
@brittanybartges9370
@brittanybartges9370 2 жыл бұрын
This was very helpful. Thank you!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome
@kunalsoni7681
@kunalsoni7681 3 жыл бұрын
really so amazing tutorial it's helps me a lot 💚
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad to hear that!
@Guytron95
@Guytron95 3 жыл бұрын
Very helpful, thanks!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it was helpful!
@CanDoSo_org
@CanDoSo_org 9 ай бұрын
Thanks, Tony. One question. What should I do if there is a new version of python released. Update once or I have to update for each of these virtual environment?
@TonyTeachesTech
@TonyTeachesTech 9 ай бұрын
Thanks for watching! You need to update for each of the virtual environments if you think its necessary.
@CanDoSo_org
@CanDoSo_org 9 ай бұрын
Thanks, Tony.@@TonyTeachesTech
@igornovichenko8677
@igornovichenko8677 3 жыл бұрын
Preview on Tab press in terminal! Awesome feature I didn't know)
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
THE BEST :)
@prakhars962
@prakhars962 2 жыл бұрын
2:18 how did you get that easy_install? I don't have this.
@sc0820
@sc0820 2 жыл бұрын
Thank you Senpai
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@MrRobeezy29
@MrRobeezy29 2 жыл бұрын
it doesn't work when I run which python in windows powershell....please for the love of god can someone just explain wtf I need to do......
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I think on Windows it's where instead of which
@LanceThorpe
@LanceThorpe 2 жыл бұрын
awesome!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks!
@RagHelen
@RagHelen 3 жыл бұрын
So, it does not clear up the mess of multiple installations, but just creates another mess on top of it.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
An organized mess in my opinion
@souvikayan
@souvikayan 2 жыл бұрын
how will i setup venv in python 3 older versions?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Not sure about that
@artemis2751
@artemis2751 3 жыл бұрын
Thanks for the video! How can you make a virtual env. using for example python3.6? (or any other version which is not in your mac).
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You will have to build python from source. You can watch this video if you're not sure how to do that kzbin.info/www/bejne/aaXSeXWVmdRqpa8
@redspotaquashrimps
@redspotaquashrimps 2 жыл бұрын
what is the difference between this virtual environ and Anaconda?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I see Anaconda as probably a wrapper of some sort around this or at least very similar functionality
@bernabesolideogloria
@bernabesolideogloria 2 жыл бұрын
hi Tony how are you?? here from Chile, sorry, but the instructions for python 3.7 did not work for me or am I missing something to improve? Could you help me please? here are the steps i run: 1.which python 2./usr/bin/python3 -m venv ~/env/py37 3.~/env/py37/bin/activate 4.which python 5.python --version and the system response: Python 3.8.9
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
What went wrong?
@souvikayan
@souvikayan 2 жыл бұрын
what is the application name in which u are setting up the venv
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Terminal. It's built into Mac and Linux
@2bitninja280
@2bitninja280 2 жыл бұрын
Thanks for the video. I have a few questions. When you left the 1st virtual environmental you typed deactivate. So that means you shutdown the virtual environment . Is there a way to leave the VE without deactivating it? If so can you switch between more then one that is running. I guess you could just have more then one terminal running. The only issue with that is if you are remotely connecting the sever, you could be kick off by the server terminating the connect due to inactivity.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You are "deactivating" the virtual environment in your terminal session, but it still exists on the filesystem it will still work properly if you access it externally
@arifyalcn3546
@arifyalcn3546 2 жыл бұрын
Good Video I'm a little Understand :-D But I'm using Arch and I have 2 question. how to downgrade virtualenv python version? ı'm download python old version and ı'm not see folder in bin Help Mee
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I would suggest to create a separate virtual environment rather than trying to downgrade
@arifyalcn3546
@arifyalcn3546 2 жыл бұрын
@@TonyTeachesTech I'm understand you but I'm main question is "downgrade virtualenv in python version". Example my system have 3.9.10 but I'm want to create 3.6.0 how to make this. Note: Very Very Thank you
@kotk05
@kotk05 3 жыл бұрын
Thanks Ton-Ton
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome!
@sigdiary8192
@sigdiary8192 3 жыл бұрын
Hey bro why don't you make a video for windows I do have a problem with the source
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sorry, I have a Mac
@forujwalandyuvan9081
@forujwalandyuvan9081 2 жыл бұрын
kzbin.info/www/bejne/jKaohaWtgL5_iq8
@madebytl
@madebytl 3 жыл бұрын
Hii, I can't activate why? I'm using windows 10 Pro 🙏
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
What is the error message you get?
@SandeepKumar-sw5lo
@SandeepKumar-sw5lo 3 жыл бұрын
@@TonyTeachesTech Hi Tony, Is it possible to create one virtual env with multiple python versions (py2 and py3) ?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@SandeepKumar-sw5lo Yes, you can have multiple virtual environments where each one can have a different version of python
@SandeepKumar-sw5lo
@SandeepKumar-sw5lo 3 жыл бұрын
@@TonyTeachesTech my use case is one single virtual environment with multiple versions of python, is it possible to have py2 and py3 in one single virtual env?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@SandeepKumar-sw5lo Not possible
@wesleycampbell2498
@wesleycampbell2498 3 жыл бұрын
thank you... Not All Heros Wear or save lives some save us from our stupid version of our self
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
😂
@abdullashafi580
@abdullashafi580 3 жыл бұрын
you are like steve T
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
True
@-Barny
@-Barny 5 ай бұрын
Guys, help me pls: (.venv) (.venv) barny-1111-11111% deactivate (.venv) barny-1111-11111% deactivate (.venv) barny-1111-11111% deactivate zsh: command not found: deactivate What is the problem? Why do i see that second vevn when im not under the venv? How can i remove it?
The Complete Guide to Python Virtual Environments!
15:52
teclado
Рет қаралды 341 М.
How to Create and Use Virtual Environments in Python With Poetry
14:43
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 4,5 МЛН
Harley Quinn lost the Joker forever!!!#Harley Quinn #joker
00:19
Harley Quinn with the Joker
Рет қаралды 28 МЛН
Virtual Environments in Python - Crash Course
13:33
NeuralNine
Рет қаралды 91 М.
Using multiple Python version on Windows
7:19
Did Coding
Рет қаралды 24 М.
Python Virtual Environments - Full Tutorial for Beginners
9:05
Tech With Tim
Рет қаралды 64 М.
Clean New Projects with venv - Virtual Environments
8:11
NeuralNine
Рет қаралды 13 М.
How to Use the Django Admin Site (create super user and login)
8:19
Tony Teaches Tech
Рет қаралды 6 М.