siznax / wptools

Wikipedia tools (for Humans): easily extract data from Wikipedia, Wikidata, and other MediaWikis
MIT License
574 stars 78 forks source link

Install Issue Linux Mint LMDE4 #159

Open tima-chan opened 3 years ago

tima-chan commented 3 years ago

I tried to install the library using pip install wptools But it gives me this error: _Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4cAaeI/pycurl/_

the full terminal result:

Collecting wptools
  Downloading https://files.pythonhosted.org/packages/e2/5c/0d8af5532e44477edeb3dac81d3a611ea75827a18b6b4068c3cc2188bfe5/wptools-0.4.17-py2.py3-none-any.whl
Collecting pycurl (from wptools)
  Downloading https://files.pythonhosted.org/packages/ef/05/4b773f74f830a90a326b06f9b24e65506302ab049e825a3c0b60b1a6e26a/pycurl-7.43.0.5.tar.gz (216kB)
    100% |████████████████████████████████| 225kB 763kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-iv2e4b/pycurl/setup.py", line 961, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-install-iv2e4b/pycurl/setup.py", line 623, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-install-iv2e4b/pycurl/setup.py", line 101, in __init__
        self.configure()
      File "/tmp/pip-install-iv2e4b/pycurl/setup.py", line 238, in configure_unix
        raise ConfigurationError(msg)
    __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-iv2e4b/pycurl/
tima@fatimah:~$ pip install wptools
Collecting wptools
  Using cached https://files.pythonhosted.org/packages/e2/5c/0d8af5532e44477edeb3dac81d3a611ea75827a18b6b4068c3cc2188bfe5/wptools-0.4.17-py2.py3-none-any.whl
Collecting pycurl (from wptools)
  Using cached https://files.pythonhosted.org/packages/ef/05/4b773f74f830a90a326b06f9b24e65506302ab049e825a3c0b60b1a6e26a/pycurl-7.43.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-install-4cAaeI/pycurl/setup.py", line 961, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-install-4cAaeI/pycurl/setup.py", line 623, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-install-4cAaeI/pycurl/setup.py", line 101, in __init__
        self.configure()
      File "/tmp/pip-install-4cAaeI/pycurl/setup.py", line 238, in configure_unix
        raise ConfigurationError(msg)
    __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4cAaeI/pycurl/

Any help?

matthewgehring commented 2 years ago

Having the same issues on windows 10

matthewgehring commented 2 years ago

Possible solution, i just realized my error code was 10 so might be different. I cloned wptools into my projects local repo then navigated to setup.py and changed the following lines from:

with open('README.rst') as f:
    readme = f.read()
with open('HISTORY.rst') as f:
    history = f.read()

To:

with open('README.rst', encoding="utf8") as f:
    readme = f.read()
with open('HISTORY.rst', encoding="utf8") as f:
    history = f.read()

then ran setup.py. Works for me now.