asweigart / PyGetWindow

A simple, cross-platform module for obtaining GUI information on applications' windows.
BSD 3-Clause "New" or "Revised" License
362 stars 69 forks source link

Error on pip install for version 0.0.5 #9

Open pranavgore09 opened 5 years ago

pranavgore09 commented 5 years ago

While installing pygetwindow using pip install pygetwindow I get the following error But installing pygetwindow==0.0.4 works fine.

Collecting pygetwindow
  Using cached https://files.pythonhosted.org/packages/8c/95/d401a85c5e9a40fac545708961b38beb5a71c9a8fc607de30d31f03de17e/PyGetWindow-0.0.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-HxCiJ_/pygetwindow/setup.py", line 10, in <module>
        with open('README.md', 'r', encoding='utf-8') as fh:
    TypeError: 'encoding' is an invalid keyword argument for this function

System details

Ubuntu 18.04.2 LTS
Python 2.7.15rc1
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
Linux x86_64
skalozubov commented 5 years ago

Same for me on macOS

izaakstern commented 5 years ago

Yeah, its a Python 2.7 problem. open function does not know encoding in 2.7 Workaround: download source, open setup.py, change with open('README.md', 'r', encoding='utf-8') to with open('README.md', 'r') and

python setup.py egg_info
python setup.py install
lexxish commented 5 years ago

Fixed in https://github.com/asweigart/PyGetWindow/pull/11

pranavgore09 commented 5 years ago

great, Thanks @lexxish