Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,150,816 members, 7,810,132 topics. Date: Friday, 26 April 2024 at 09:26 PM |
Nairaland Forum / Science/Technology / Programming / Help In Create Virtual Environment For Python (903 Views)
Programming Group For Python / How To Open A Python Virtual Environment Project Django / Free Udemy Course For Python Programmers(2 days left) (2) (3) (4)
Help In Create Virtual Environment For Python by paranorman(m): 1:56pm On Apr 09, 2019 |
I want install python 2 and python 3 on my system and I read that it's possible when you install in separate envroments. How do I go about this? Any help.. |
Re: Help In Create Virtual Environment For Python by EvilSec: 2:21pm On Apr 09, 2019 |
paranorman:I use both pretty easily with linux! 1 Like |
Re: Help In Create Virtual Environment For Python by EvilSec: 2:22pm On Apr 09, 2019 |
You could use Docker though. 1 Like |
Re: Help In Create Virtual Environment For Python by paranorman(m): 7:24pm On Apr 10, 2019 |
EvilSec:Expantiate |
Re: Help In Create Virtual Environment For Python by kudaisi(m): 8:27am On Apr 11, 2019 |
What I do is to simply install both and add the python installation folder to PATH (located in the environment variable in window). The conflict now would be that you have 2 "python.exe" in your path. So to resolve that I go back and rename the "python.exe" executable for Python27 to "python2.exe". That way, when I execute > python something (python 3 works it way) > python2 something (in this case, python2 gets called) |
Re: Help In Create Virtual Environment For Python by OpenYourEyes1: 8:33am On Apr 11, 2019 |
paranorman: You could do this on python with a feature called "virtualenv" Run this command prompt: "pip install virtualenv" then install any version of your choice from python website. |
Re: Help In Create Virtual Environment For Python by Ceekay212: 12:22pm On Apr 11, 2019 |
It won't clash. Python 2 is in python27 folder, a child folder of c:/...... To open python CLI or run a .py file simply prefix py -2 or py -3 in your cmd E.g 1. To open python 3 CLI, open cmd, type py -3 2 To run a .py file, open cmd, type py -3 text.py (ensure you are in same dir as the file) Nb. When installing py 3 & 2, ensure you tick 'add to PATH' or do it manually Just in case you still want to use a virtual environment, go to pydocs and check out venv. It is now inbuilt with python no need for external modules like virtualenv like some people may suggest 1 Like |
Re: Help In Create Virtual Environment For Python by paranorman(m): 7:05pm On Apr 11, 2019 |
Thanks y'all for your inputs, really helpful |
(1) (Reply)
Proposal Needed For A Good Ict Program Or Software That Can Be Used In A State. / Pls Can I Use Facebook Page As My Landing Page For Nairaland Advert? / Learn Programming For Free For Lagos Based Only
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |