-1

I am new to Python so sorry if the question is trivial. I need to work with python and Excel tables, therefore I was looking to install Openpyxl. I downloaded the .tar.gz pack and unizipped with Peazip, went to the terminal, set the directory to where the setup.py file is and run "py setup.py install". What I get is the following error:

C:\Python27\openpyxl>py setup.py install
Traceback (most recent call last):
File "setup.py", line 30, in <module>
from setuptools import setup, Extension, find_packages
ImportError: No module named setuptools

I did not modify anything with the files I downloaded, this is the folder I am running the code in:

http://i.stack.imgur.com/cxPwM.png

What could the problem be?

Patapunfate
  • 277
  • 4
  • 11

2 Answers2

0

You can try this first: pip install setuptools, and then try to install what you want.

sehrob
  • 1,004
  • 14
  • 23
  • Thank you in the end I managed to solve the problem by installing setuptools as you suggested me. Anyway I tried to run the line you wrote above but it seems "pip" was not recognized as a console command. What might have been the problem? – Patapunfate Apr 07 '16 at 10:20
  • `pip.py` is situated in the `Scripts` directory which is in Pythons installation directory. Maybe it is here `C:\Python27\Scripts\`. So, first you can find where the pip.py is and change to this directory and try it or you can add this directory to the Path variable and try. – sehrob Apr 07 '16 at 10:24
0

It seems that setuptools is not installed on your system, try installing it: https://pypi.python.org/pypi/setuptools

Maximilian Peters
  • 24,648
  • 11
  • 64
  • 80
  • Yes that was the problem apparently. I installed setuptools and now I managed to install openpyxl, it works. Thank you a lot – Patapunfate Apr 07 '16 at 10:19