0

I am trying to access python 3.4 from the terminal under windows 7. I have installed Python through Anaconda distribution and with it I installed python 2.7 by default and python 3.4 in a virtual environment.

when I run this:

c:\Anaconda\envs\Python34\Python.exe setup.py

I get:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied

So how can I call python 3.4 from the terminal?

Thanks in advance.

2
  • You just ran python 3.4 there? That message is coming from setup.py Commented Jul 20, 2015 at 7:55
  • Please explain what the problem with what you already did is. Commented Jul 20, 2015 at 8:03

2 Answers 2

1

Make the first line of myscript.py a hashbang:

#!c:\Anaconda\envs\Python34\Python.exe

If you only have a single Python 3.x interpreter installed then the hashbang can be simpler:

#!python3

Then run the script with py:

C:\> py myscript.py

or just:

C:\> myscript.py
Sign up to request clarification or add additional context in comments.

1 Comment

same here, I get : 'py' is not recognized as an internal or external command
0

Python for windows ships with a launcher that managed multiple versions:

py -2 my2script.py
py -3 my3script.py
py -3.4 mynew3script.py

7 Comments

I get : 'py' is not recognized as an internal or external command
Then it's not on your path.
@SantiPeñate-Vera, it gets installed into C:\windows when you install Python 3.x. Did you install from a standard distribution?
Might be, so, shall I add 'c:\Anaconda\envs\Python34\Python.exe' to the system path?
@Duncan I installed python 2.7 from anaconda distribution and later added python 3.4 as a virtual environment.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.