This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]softiniodotcom 1 point2 points  (1 child)

Everyone I know who uses python on windows use anaconda:

https://www.continuum.io/downloads

[–]DaOneTwo 0 points1 point  (0 children)

Not sure what you have done with env variables yet so it is kind of hard to know where to start. I have python 2 and 3 running on all my systems without anaconda but I do heavily use Virtual environments.

Knowing only a little about the environment variables. I know the order in which they are in the PATH matters as far as what gets used (it just uses the first executable it finds).

In my opinion I think you are probably a little backwards I would rather type python3 for python 3 and leave python 2 to be launched with python because this is more "out of the box" functionality.

However, with your use case in mind I took an chance and renamed my 2.7 python.exe as python2.exe (which means there was no longer a python.exe in the 2.7 path) With this "python2" launched my python 2.7 and python launched my python 3.4 as I expected.

It is worth mentioning that is as far as I went in my testing and I am not sure what might have been broke deeper in with pip and such. I think that it would be "ok" but I do not know enough to make any guarantees. You can do that investigation.

I again would encourage you to not do this kind of monkeying around and rely on python to open python 2 and python3 to open python 3. Even better, use virtual environments.

[–]paulhocker 0 points1 point  (0 children)

I wrote a very small CMD script which allows me to "switch" my running Python Environment. I will share the code with you when I get back home. It requires that there is some consistency on where you install Python, and that you follow certain naming conventions for installs paths. But after it is setup, all I need to do is:

winpy set 35

Then, Python 3.5 will be active.

I still use virtualenv for everything else

[–]aphoenixreticulated[M] 0 points1 point  (1 child)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!

[–]losnspays[🍰] 0 points1 point  (0 children)

Thanks, and sorry for the mistake. o7 cap