Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error in windows #371

Closed
mark99i opened this issue Jan 27, 2019 · 2 comments
Closed

import error in windows #371

mark99i opened this issue Jan 27, 2019 · 2 comments

Comments

@mark99i
Copy link

mark99i commented Jan 27, 2019

I want using grab, but when importing i get error:

Traceback (most recent call last):
  File "C:/Users/Mark/Desktop/test.py", line 13, in <module>
    from grab import Grab
  File "C:\Program Files\Python37\lib\site-packages\grab\__init__.py", line 3, in <module>
    from weblib.logs import default_logging  # noqa
  File "C:\Program Files\Python37\lib\site-packages\weblib\logs.py", line 4, in <module>
    def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a',
AttributeError: module 'logging' has no attribute 'DEBUG'

Python 3.7
installed pycurl 7.43.1, lxml 4.3.0, grab 0.6.41, requests 2.21.0

@eyupkara
Copy link

Same issue on my very last version Ubuntu 20.04.

----------~/PycharmProjects/CSVWrite/venv$ pip install -U grab
Collecting grab
Using cached grab-0.6.41.tar.gz (1.1 MB)
Collecting weblib>=0.1.28
Using cached weblib-0.1.30.tar.gz (30 kB)
Requirement already satisfied, skipping upgrade: six in /usr/lib/python3/dist-packages (from grab) (1.14.0)
Collecting user_agent
Using cached user_agent-0.1.9.tar.gz (20 kB)
Collecting selection
Using cached selection-0.0.14.tar.gz (4.5 kB)
Collecting defusedxml
Using cached defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting lxml
Using cached lxml-4.5.1-cp38-cp38-manylinux1_x86_64.whl (5.4 MB)
Collecting pycurl<7.43.0.2
Using cached pycurl-7.43.0.1.tar.gz (195 kB)
ERROR: Command errored out with exit status 1:
command: /home/kara/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nzvd6c3f/pycurl/setup.py'"'"'; file='"'"'/tmp/pip-install-nzvd6c3f/pycurl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ynsckdk2
cwd: /tmp/pip-install-nzvd6c3f/pycurl/
Complete output (22 lines):
Traceback (most recent call last):
File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 103, in configure_unix
p = subprocess.Popen((CURL_CONFIG, '--version'),
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 841, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 508, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 72, in __init__
    self.configure()
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 108, in configure_unix
    raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@kamiloski88
Copy link

Same issue on my very last version Ubuntu 20.04.

----------~/PycharmProjects/CSVWrite/venv$ pip install -U grab
Collecting grab
Using cached grab-0.6.41.tar.gz (1.1 MB)
Collecting weblib>=0.1.28
Using cached weblib-0.1.30.tar.gz (30 kB)
Requirement already satisfied, skipping upgrade: six in /usr/lib/python3/dist-packages (from grab) (1.14.0)
Collecting user_agent
Using cached user_agent-0.1.9.tar.gz (20 kB)
Collecting selection
Using cached selection-0.0.14.tar.gz (4.5 kB)
Collecting defusedxml
Using cached defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting lxml
Using cached lxml-4.5.1-cp38-cp38-manylinux1_x86_64.whl (5.4 MB)
Collecting pycurl<7.43.0.2
Using cached pycurl-7.43.0.1.tar.gz (195 kB)
ERROR: Command errored out with exit status 1:
command: /home/kara/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nzvd6c3f/pycurl/setup.py'"'"'; file='"'"'/tmp/pip-install-nzvd6c3f/pycurl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ynsckdk2
cwd: /tmp/pip-install-nzvd6c3f/pycurl/
Complete output (22 lines):
Traceback (most recent call last):
File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 103, in configure_unix
p = subprocess.Popen((CURL_CONFIG, '--version'),
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 841, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 508, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 72, in __init__
    self.configure()
  File "/tmp/pip-install-nzvd6c3f/pycurl/setup.py", line 108, in configure_unix
    raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Did you solved this problem? I get the samme message on ubuntu

@lorien lorien closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants