Frage

I am new to Python, but very excited to learn! However, I am having difficulty installing a Python module using Spyder on a Mac.

First, I go to the directory with the setup.py file.

import os
os.chdir('/Users/UserName')

Then, I attempt to install the module.

ez_setup.py install

I receive the following error.

  File "<stdin>", line 1
    ez_setup.py install
                      ^
SyntaxError: invalid syntax

Any advice on what is going wrong? I have looked around, but I cannot find an explanation of what may be going on in this case. It seems like module installation should be easy.

War es hilfreich?

Lösung

Try python ez_setup.py install ?

When using a .py file, you have to give it to python executable :)

Edit: You can have a look on this page - http://pythonhosted.org/an_example_pypi_project/setuptools.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top