You are not logged in.
Pages: 1
Hello everyone,
my problem is the following : in my university, I am a tutor for practical sessions on Python for scientific computing. This is done in Python 2. For work, I also use a code that is written in Python 2. But when I write my own scripts and programs, I usually do it with the Python 3 syntax on my laptop running Arch. So I have to switch between the two versions.
So, on my install, I have a bunch of duplicated packages (ipython / ipython2, and so on...), and I wonder if it can raise some conflicts (first question here ).
My idea is to switch to virtual environments, where I would install the packages needed for Python 2 (for teaching and for compatibility with the code at work), and keep a "clean" Python 3 on my main system.
Do you think this is the right way to go ? If this is the case, can I safely remove the packages from python2 ? If not, is there a simple solution ?
Thanks a lot for your help on this matter I'd appreciate any advice on this, as I am not that familiar with virtual envs yet...
Offline
I've had no problems with both 2 and 3 on my machine. Having a VM for one or another is not a bad idea but it's probably unnecessary.
Last edited by nullified (2015-04-02 21:30:11)
"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace
Offline
Nothing wrong at all with having both installed. Unless you have something that screws with $PYTHONPATH, you should be fine.
Just remember to use the correct shebangs. http://legacy.python.org/dev/peps/pep-0394/
Last edited by Scimmia (2015-04-02 22:01:53)
Offline
My idea is to switch to virtual environments, where I would install the packages needed for Python 2 (for teaching and for compatibility with the code at work), and keep a "clean" Python 3 on my main system.
Do you think this is the right way to go ? If this is the case, can I safely remove the packages from python2 ? If not, is there a simple solution ?
What Scimmia said is correct, but if you would like to prevent your system from cluttering with unnecessary packages, virtualenvs are the way to go. Also, when you are teaching something, I believe you'll be installing new python packages every now and then, so even for that case a virtualenv would be a cleaner solution, in my opinion.
Offline
but if you would like to prevent your system from cluttering with unnecessary packages, virtualenvs are the way to go. Also, when you are teaching something, I believe you'll be installing new python packages every now and then, so even for that case a virtualenv would be a cleaner solution, in my opinion.
Yeah, I think I will follow this lead, to become more familiar with these environments. Though it is reassuring that the two can live together without raising troubles. Thanks for the insight !
Offline
Pages: 1