MyKings / python-masscan

python-masscan is a python library which helps in using masscan port scanner.
https://pypi.org/project/python-masscan/
GNU General Public License v3.0
281 stars 60 forks source link

TypeError: 'encoding' is an invalid keyword while installing #23

Closed Emirati closed 4 years ago

Emirati commented 4 years ago

Hi,

While installing python-masscan using the following command:

pip install python-masscan

I get the following error

Collecting python-masscan
  Using cached https://files.pythonhosted.org/packages/84/84/1ebf64158cd996958b3979984b731c675321fbca16b36009c6289914ae06/python-masscan-0.1.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/tf/g0srqs6n3ql4fd_5ml3xzrbh0000gn/T/pip-install-hi51vt/python-masscan/setup.py", line 15, in <module>
        with open(os.path.join(here, 'README.rst'), encoding='utf-8') as readme_file:
    TypeError: 'encoding' is an invalid keyword argument for this function

Python Version: 2.7

Apparently, the open() built-in function it is introduced in python2 as io.open() and for compatibility io.open() is an alias to open() in python3