Closed abhishek-das-gupta closed 8 months ago
It sounds like you might have a number of misunderstandings about how Python packaging, build, and dependency installation work. Generally, each Python version has its own version-specific site-packages
dir, so as long as you invoke each Python version's pip
correctly (eg, use python3.10 -m pip
instead of the pip
script wrapper to ensure you're running the right pip to manage your python3.10 env, python3.11 -m pip
for 3.11, etc), you can just install the right pre-built wheel to each version's environment. Building from source isn't going to help you- modern versions of pip (under the covers) always try to build a wheel to install from source anyway, so you're going to end up with roughly the same thing (sans all the testing that our distributed binary wheels get).
If you're trying to do something custom like mashing all the different Python versions' deps into a single directory and use sys.path
hackery to make it load, well, good luck with that. It might actually work for PyYAML today if you manually extract the wheels and just put all the version-specific binaries next to each other (Python will ignore the foreign versions), but that's not "supported" and could break at any time.
In any case, this isn't a deficiency of PyYAML, so I'm closing this issue.
I am trying to instal PyYAML 6.0 using the source distribtuion instead of using the wheel. This is because my application can support multiple python versions(3.8, 3.9, 3.10) and I can't add corresponding wheels for each of them. Hence I'm building from source.
So This is the command within a make file which installs the pacakges from requirements.txt
where the
file:///root/cmf/build/sles15/agent-build/ext-py
is the directory that contains the PyYAM 6.0 folder which I got from https://pypi.org/project/PyYAML/6.0/#files:~:text=Source%20Distribution-,PyYAML%2D6.0.tar.gz,-(125.0%20kB%20viewBut when the above command runs within though a make command it fails. The
/root/cmf/build/sles15/agent-build/pip.log
shows the following:Comparing the pip logs for some other pacakge,
Why the PyYam 6.0 not running the showing the log
Running command python setup.py egg_info
instead it is trying to install setuptools, wheels, CPython?Here is the pip which is getting reffered.
Please suggest how do I debug this and get the source distribution to install instead. Thanks!