Closed sean-smith closed 5 years ago
pyparted requires libparted and its headers in order to build. When you installed it via yum, you got the precompiled package and the necessary runtime dependencies. But when installing in virtualenv, it wants to build from source so you need the build requirements for pyparted.
thanks, is there any other way to get this working inside a virtualenv?
Did you try "yum install parted-devel" and then try the virtualenv thing again?
yes, error is:
ERROR: Complete output from command python setup.py egg_info:
ERROR: *** Minimum required libparted version: 2.3, found: 2.1
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-lpPon9/pyparted/
Looks like the yum package isn't up to date enough.
I've removed my dependency on pyparted so this isn't an issue any longer
If you're building pyparted from source, you'll need to meet the build requirements. I'm not sure what distribution you're on, but it obviously has an older libparted. You can upgrade that package in order to build pyparted from source. There's really no way around that when building things from source.
But how to install pyparted not building from source?
If your distribution provides pyparted as an installable package, use their tool to install it. For example, on a Fedora or RHEL system you can do:
yum install pyparted
Is there any chance to pack the binary parts directly into the pip package so you can install it with pip install?
Yeah I'm not really sure what it is after here. I am working in an OL7 container, I installed parted-devel
and it still complains it can't find libparted.pc
. I am working through a build system and venv and am not sure how to find the file to set the PKG_CONFIG_PATH variable it seems to be looking for.
I'm trying to get pyparted to install within a virtualenv. I've been able to use the following
However when I attempt to install pyparted with pip in the virtualenv, I get:
Any help is appreciated!