I tried to find a question that would answer to this question but wasn't succesful, so I made a new question.
I'm trying to compile my old Python Tic Tac Toe game in NetBeans, but I get the error message
ImportError: No module named setuptools
In my actual code I haven't imported a module named setuptools. As much as I un开发者_如何学Goderstand the compiler generates a setup.py file and tries to use that setuptools module in there. How can I fix that problem?
I'm pretty sure that the problem isn't in the code as that same code worked perfectly the time when I actually made it and I haven't changed it after that.
You need to install either setuptools or Distribute in your Python instance. Follow the directions at either web page.
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
Same answer as Satya, but easier to copy&paste:
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
sudo python setup.py install
Same answer as above, but since I dont have comment rights here is the working version which ignores the certificate mismatch for ssl auto-redirect :
wget --no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
sudo python setup.py install
精彩评论