-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
Installation instructions for Linux #1045
Comments
Disclaimer: I really think that the whole documentation has to be rewritten and/or reorganized, and the Install page should be the first one to change.
Nevertheless, I’ll try to defend the current documentation 😄. (We have to add in the documentation that WeasyPrint is now packaged for Ubuntu. Average Linux users will just have to launch
It’s true, nobody does this anymore. But this was good advice in 2013, when 1145958 was committed 😉.
You’re right. I really don’t know why it’s a separate package in Debian/Ubuntu, even if it’s in the standard library since Python 3.3.
You can, but it’s not mandatory. (Is it?)
I have red scary red lines with "Failed building wheel for cairocffi" and "Failed building wheel for pycparser", but the packages are installed and everything works out of the box. I’ve created a fresh virtual environment on my Ubuntu 18.04.3 computer, and it works. Could you please paste the whole trace? |
... for Ubuntu Focal.
Updating pip and setuptools isn't mandatory, of course. In fact: With outdated pip-9.0.1 setuptools-39.0.1 the WeasyPrint installation succeeds (though there are those 2 red scary lines you mentioned). The upgraded pip-20.0.2 setuptools-45.1.0 fails! Trace of failing
BTW: Where are the logs I'm supposed to check for the full command output? |
Better late than never!
I’m so mad at Python packaging. Really. Could anyone on Earth explain why Could anyone on Earth explain why searching "invalid command 'bdist_wheel'" on your favorite search engine will return dozens similar problems and dozens of "just install wheel before" answers? Hello, it’s 2020! Python is so powerful that it can help scientists to draw black holes, so sad it BREAKS DISTRIBUTION of PURE PYTHON PACKAGES each time PIP OR SETUPTOOLS IS UPDATED because someone created a PEP THAT HAS BEEN ACCEPTED that introduces yet another pyproject.toml (toml!) CONFIGURATION FILE I’LL PUT NEXT TO MANIFEST.in, setup.py, setup.cfg, tox.ini and requirements.txt. More than 1000 open issues for setuptools and pip. I know that the PyPA team members are doing their best. I’m really sorry to be so angry, I shouldn’t. Dealing with legacy problems is hard. No hard feelings. But… Users gave up, they’ve just all turned into monkeys repeating "pip install wheel, don’t ask why, that’s what Stack Overflow said". 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 🐵 Now, I’m a monkey too. I don’t want to understand why pip (or setuptools, or whatever) needs to build wheels, and doesn’t fallback to the "legacy" code path for building and installing projects. I give up. OK, we need to build wheels. But, I’d love to find someone able to answer this question: ❇️ 💖 ❇️ Why does pip try to build a wheel without installing the (Oh, no! So sad! I’m pip, my job is to install packages, I need to build wheels, but the "wheel" package is not installed 😢. If only I knew a way to install the "wheel" package… Wait!?!?) (I’m ready to accept a pull request asking users to launch |
If it can help, here my gitlab config for alpine image : |
I'd like to add my pet peeve to this discussion. Not everybody uses virtual environments for python packages. For dedicated servers running single webs/applications there is absolutely nothing wrong with installing system wide packages and in fact many organizations have "bare-metal" policies where any middle virtualization or obfuscation layers are frowned upon as they don't add value but do add complications to server configuration, dependencies and at worst cost cpu time. In fact the first thing mentioned after suggesting to add virtualenv instructions is that we need more dependencies. If you want to use virtual environments you probably know how to translate the instructions to your preferred virtualenv - and they seem to come out with a new competing virtualenv implementation every quarter or so. Also, I don't need every library I use to teach me how to use a virtual environment - but still way to many of them do. It's out of scope. If the installation instructions work on a server they also work inside your chosen virtualenv implementation, just without the sudo. |
The documentation has been rewritten, including:
We close the issue now, but feel free to open new issues if you think that the new Linux documentation can be improved! |
Unless we assume that THE AVERAGE LINUX USER is somebody who likes to tinker with her system and knows what's going on, the installation instructions for Linux are not exhaustive enough. At least on Ubuntu 18.04 they don't work out of the box.
Don't know nothing (yet) about other distros, but on Ubuntu I'd never tell anybody to run pip as
sudo
-- I didn't do it but I'm sure that kittens will die when pip installs into root's USER_SITEsite-packages
folder (afaik--user
is the default option for pip on Ubuntu).To use a virtual environment the
python3-venv
system package must be installed, too,After the
venv
is activated one should update the outdated pipWhen I tried to
pip install WeasyPrint
it failed with the well-known animosities of cairocffi not being able to run pycparser or building a wheel for pycparser or whatever ... "ERROR: Command errored out with exit status 1."I'd really like to know what's wrong with cairocffi. Ok, no problem. Solution is to install step-wise:
Volunteering to improve
install.rst
I'd like to know whether these issues apply to other Linux distros too.The text was updated successfully, but these errors were encountered: