4 ms·
Try "pip install pycurl". It'll fail. The solution is to install a C compiler and (on Ubuntu) run apt-get install libcurl4-openssl-dev. That's very different to
by richardwhiuk 10y ago
Try "pip install pycurl". It'll fail. The solution is to install a C compiler and (on Ubuntu) run apt-get install libcurl4-openssl-dev. That's very different to other languages - they don't expect you to have a bunch of different development environments.
- thewhitetulip 10y agotaking a quick look at the issue the website says PycURL is a Python interface to libcurl. and that would mean that we need libcurl installed. I am sure this is true with any other language as well, since this is a linker library, if that's a word. also, surprisingly the website didn't mention that you need to install the libcurl4-openssl-dev :-) so something is broken on this package. Again, this is a package issue and not the issue of the language. We can find such examples in all languages. Doesn't mean Python's package system is broken or the language is broken. I am waiting when the author will start teaching Go! just to read his "Problems everyone faces learning Go".
- nl 10y agoPycURL is a Python interface to libcurl. and that would mean that we need libcurl installed. I am sure this is true with any other language as well, since this is a linker library, if that's a word. But this is just an example of the type of thing that is typical in Python using pip. Anaconda is a bit better (see [1] for the details) but it is a real problem. It isn't uncommon to resort to Docker to work around this. Pretending this isn't a problem for beginners (and even comparatively advanced users) isn't helpful. [1] https://www.continuum.io/blog/developer-blog/python-packages-and-environments-conda https://www.continuum.io/blog/developer-blog/python-packages...
- thewhitetulip 10y agoI am curious, how do these libraries work for other languages, for instance Java interface to curl, how do they work around that fact? This can be put forward as a PEP, I am not undermining the issue.
- nl 10y agoI am curious, how do these libraries work for other languages, for instance Java interface to curl, how do they work around that fact? They typically ship a private precompiled library and link to without using the system LD_LIBRARY_PATH (or whatever). Anaconda gets this mostly right - they ship precompiled libraries, but I'm not sure what the do with the linking situation. This can be put forward as a PEP, I am not undermining the issue. That isn't the most useful response for a beginner programmer.
- thewhitetulip 10y agoexactly how many such precompiled libs do other languages ship? pycurl etc.is not a part of stdlib, python or pip is not broken, this package's install mech could be broken >That isn't the most useful response for a beginner programmer. it was not for them, it was for those who are willing for a change and think this is a legitimate problem, jmdownvoting me win't make me shut up or solve the problem! we can ask for a PEP since python is an Open Source project, noy sure if the author of this post tried that approach
- Illniyar 10y agoThat's not really true, lots of languages requires certain modules to be built from source with a C compiler. Ruby and Node.js comes to mind. Though in general the community behind them do a much better job of hiding this complexity from the user - to the point that most times you don't realize you've compiled it from source.
- deleted 10y ago[deleted]
- anaphor 10y agoWorked fine for me (I had never used it before). Perhaps the problem is with your OS? Learning how to install dependencies should be one of the first things a programmer learns. I don't think it's unreasonable to learn that a message like "Error: X requires this library! Failed to install" means you should go and install that library. Plus it can be frustrating when something comes with its own version of a certain library because it makes tracking down bugs more difficult. For example Python ships its own version of libffi (the library it uses to call C functions). I've had issues with this library before, and it turned out the Python devs hadn't bothered to update it in a long time, because it "worked", but it didn't for me, and the newer version worked fine. So I had to end up trying to rebuild Python from source with a more up-to-date version of libffi, which was a giant pain. It may be "easier" to make everything self-contained like that, but it causes headaches too. Maybe it would be better in those cases if the library were just packaged in the distro's package manager? (Or brew for Macs). That would allow for more complete dependency handling.