سؤال

This is my first attempt at installing an add in for Python. I have extracted the twitter module to a folder within my Python33 directory that I have called 'Plug ins'. I have then navigated to this in Command Prompt and entered the following code that I have found on the Python website:

python setup.py install

That produced an error that 'python' was not a recognised command. When i removed 'python'a nd just ran:

setup.py install

I got the error message:

Import error: No module named 'setuptools'

What am I doing wrong?

Thanks

هل كانت مفيدة؟

المحلول

You need to install setuptools:

https://pypi.python.org/pypi/setuptools#installing-and-using-setuptools

Basically,

  • for Linux:

    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
    
  • for Windows 7:

    download and execute this file.

  • for Windows 8, execute in PowerShell (as Admin):

    (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python -
    
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top