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

Installing label-maker on Ubuntu #86

Closed
adbedada opened this issue Jun 12, 2018 · 5 comments
Closed

Installing label-maker on Ubuntu #86

adbedada opened this issue Jun 12, 2018 · 5 comments

Comments

@adbedada
Copy link

adbedada commented Jun 12, 2018

I am attempting to install label-maker on Ubuntu and the following error message came up. Are the dependencies compatable with Linux systems?

Using cached https://files.pythonhosted.org/packages/77/d9/d272b38e6e25d2686e22f6058820298dadead69340b1c57ff84c87ef81f0/pycurl-7.43.0.1.tar.gz
  Complete output from command python setup.py egg_info:
  Traceback (most recent call last):
    File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 104, in configure_unix
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': '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-_pmpop_f/pycurl/setup.py", line 841, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 508, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 72, in __init__
    self.configure()
  File "/tmp/pip-install-_pmpop_f/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': 'curl-config'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 104, in configure_unix
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': '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-_pmpop_f/pycurl/setup.py", line 841, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 508, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/tmp/pip-install-_pmpop_f/pycurl/setup.py", line 72, in __init__
    self.configure()
  File "/tmp/pip-install-_pmpop_f/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': 'curl-config'

----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-_pmpop_f/pycurl/
@drewbo
Copy link
Contributor

drewbo commented Jun 12, 2018

Thanks for posting @adbedada! This will probably require some additional dependencies with Linux. Can you try installing libcurl and gcc (sudo yum install libcurl-devel gcc) and trying the install again? Once we find out what's missing we can add this to the README. Thanks

@drewbo
Copy link
Contributor

drewbo commented Jun 13, 2018

Still looks like a pycurl issue @adbedada. Can you try installing that on its own and once it's good, installing label-maker?

@adbedada
Copy link
Author

@drewbo, I tried installing label-maker on different linux machine and noticed that If the system has an existing pycurl module, the installation will be incomplete since pycurl==7.43.0.1 is required.

  Installing collected packages: pycurl, homura, Shapely, future, pyclipper, protobuf, 
  mapbox-vector-tile, click-plugins, numpy, snuggs, attrs, affine, cligj, rasterio, Pillow, 
  tilepie, mercantile, pyproj, requests, mbutil, label-maker
  ------------
  Found existing installation: pycurl 7.43.0
  Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately 
  determine which files belong to it which would lead to only a partial uninstall. 

Unfortunately, "pip uninstall pycurl" doesn't work and I'm attempting to see if I can remove pycurl completely and may be install the version required.

@adbedada
Copy link
Author

adbedada commented Jun 15, 2018

Finally... label-maker is now installed after making a couple of changes. Here are the steps.
First, remove the exiting pycurl from the system.

sudo apt-get remove python3-pycurl

Before installing it back, do the following.

sudo apt-get install build-essential libcurl4-gnutls-dev 
sudo apt-cache search gnutl | grep dev
sudo apt-get install libgnutls-dev

Then, re-install pycurl

pip install pycurl==7.43.0.1

Now, you should be able to install label-maker. If the issue persists, run the following.

sudo apt-get install python3-dev

once completed, try to install pycurl

Thank you @drewbo for your support!

@caffeine-potent
Copy link

I don't recall all of the details of how I got it to run.
At the very least I remember running these commands:

sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libssl-dev

@drewbo drewbo mentioned this issue Oct 31, 2019
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

3 participants