3 ms·
I guess I knew in general about wheels but didn't see how it would solve "usability" problems like this one. Does `pip install lxml` fail in a similarly perple
by wyldfire 11y ago
I guess I knew in general about wheels but didn't see how it would solve "usability" problems like this one.
Does `pip install lxml` fail in a similarly perplexing way if you don't have `build-essential` (`gcc` et al) installed? If so maybe the difference is that the posix/linux crowd is more likely to have installed a compiler at this point.
Here's hoping MSFT's Linux ABI support evolves into the norm for a port target.
- dsp1234 11y agocompilation terminated. ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? ********************************************************************************* error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_test/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-QEyvN6-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_test/lxml Storing debug log for failure in /home/test/.pip/pip.log There is some stuff above in the log, but the nothing about build-essentials. And a new dev would likely have to hit google/stackoverflow.
- petetnt 11y ago> If so maybe the difference is that the posix/linux crowd is more likely to have installed a compiler at this point. The long running issue with Windows was that there weren't any compilers available (AFAIK) outside of installing Visual Studio first. When Visual Studio started offering free versions, the problem persisted: it's rather hard to justify downloading and installing a +4gb program just to make an dependency or extension to work (even if it wasn't directly required for the said dep). For example, this was a huge issue with node-gyp[1], which prompted Microsoft to release standalone Build Tools[2] to alleviate the problem. I think it's the same kind of issue with Python here, right? [1] https://github.com/nodejs/node-gyp/issues/629 https://github.com/nodejs/node-gyp/issues/629 [2] https://www.microsoft.com/en-us/download/details.aspx?id=49983 https://www.microsoft.com/en-us/download/details.aspx?id=499...
- staticautomatic 11y ago`pip install lxml` will indeed fail without VC++ for Python. In fact, sometimes it fails even with VC++ (e.g. installing lxml from within PyCharm). However, executing the binary installer or using `pip install lxml_package_whatever.whl` works just fine.
- recursive 11y agoI tried to get into linux development within the last year or so. One of the most frustrating obstacles I ran into was that attempting to install packages would mysteriously fail. I found it that was because I was missing a package called "build-essential". I thought one of the package manager's reason for existence was that it could track dependencies, and it didn't appear to be doing that. I still don't understand how that can happen. It seems to me that a package installation ought to be tested against a fresh image to verify the dependency tracking is working correctly.
- khedoros 11y agoPackaging dependencies and build dependencies are tracked separately. For example, if I don't have a C compiler installed, installing a development package like "libxml2-devel" will probably cause the compiler to be installed. In the opposite case, say that I have the compiler installed, but not the dev package for the library. Compiling an object will fail, if it #includes a required header, but that will be in the form of a "file not found" error emitted by the compiler. Similarly, if I tried to link a program and include the "-lxml2" flag, the linker will reply "cannot find -lxml2", meaning that libxml2 isn't installed, so it can't be linked against. Generally, we'd say that it's not the compiler or linker's job to talk to the package manager. The build configuration system included with the project (autoconf scripts, cmake or ant profiles, etc) ought to check for prerequisites.
- db48x 11y agobuild-essentials is an Ubuntu package which depends on a number of important libraries, gcc, the associated toolchain, etc. Just installing a pre-compiled package won't require a compiler though, it's only when you want to build something from source that you need it. There are a number of python packages that don't come pre-compiled; that may be what you were seeing.