Reputation: 399
I'm trying to install iPy, but I can't seem to do it right. This is the first time I install a module, so please don't assume I should be knowing some things. I downloaded the file, and I have a setup.py. I held down Shift+Right Click, then "open Command Prompt Here", and pasted the following line :
python setup.py --help
or python setup.py install
It says that it is not recognized as an internal command.
I tried opening it in python and running it, and I get this error:
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
I also tried to paste python setup.py --help
and python setup.py install
in the python console, and I get this:
Traceback (most recent call last):
File "T:\MATH\Logiciels MATH BD\Program Files\EduPython\App\lib\code.py", line 63, in runsource
code = self.compile(source, filename, symbol)
File "T:\MATH\Logiciels MATH BD\Program Files\EduPython\App\lib\codeop.py", line 168, in __call__
return _maybe_compile(self.compiler, source, filename, symbol)
File "T:\MATH\Logiciels MATH BD\Program Files\EduPython\App\lib\codeop.py", line 99, in _maybe_compile
raise err1
File "T:\MATH\Logiciels MATH BD\Program Files\EduPython\App\lib\codeop.py", line 87, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
File "T:\MATH\Logiciels MATH BD\Program Files\EduPython\App\lib\codeop.py", line 133, in __call__
codeob = compile(source, filename, symbol, self.flags, 1)
File "<interactive input>", line 1
python setup.py --help
^
SyntaxError: invalid syntax
How am I supposed to install it ?
EDIT: A screenshot of what I get:
Upvotes: 1
Views: 2648
Reputation: 3898
Run this code in a Python shell (i.e. one where you can run Python commands, for example the Python GUI) to get the location of your installed Python:
import sys
sys.executable
This will give you the complete path to the Python interpreter.
Then, in command prompt (Shift-Right Click where the setup.py is located and open Command Prompt) specify the complete path to Python like this:
"C:\Python36\python.exe" setup.py install
Or whatever your path is.
Upvotes: 1
Reputation: 1569
setup.py
is designed to be run from the command line. You'll need to open your command prompt (In Windows 7, hold down shift while right-clicking in the directory with the setup.py
file. You should be able to select "Open Command Window Here").
From the command line, you can type
python setup.py --help
If you want to install it then the command is install:
python setup.py install
If you need to build the package first, use the build command before installing:
python setup.py build
Hope this helps!
HELP:you need more details use this link.
Even the above commands may not work correctly. In that case, you can download the Windows installer version which will install the library to your default system Python
Upvotes: 1
Reputation: 5257
Sounds like you don't have Python in your $PATH
, in that case you need to explicitly write the full path to your Python install, because your shell doesn't know where to find python
. For Python 3.6 under Windows that'd probably be C:\Python36\python.exe
(or whatever you chose when installing it).
Hence, to install iPython, run:
C:\Python36\python.exe setup.py install
Upvotes: 2