Unable to specify filip as dependency in pyproject.toml based package on windows
Haifischbecken opened this issue · 4 comments
Describe the bug
When trying to install a package based on PEP621 using only a pyproject.toml
to define the buildprocess, filip
can not be used as dependency when installing on Windows. The problem is likely caused by the use of the fixed version of igraph==0.9.8
. We tried using version 0.11.2
which does solve the installation problem. We did not notice any difference in the behaviour of filip
.
To Reproduce
Steps to reproduce the behavior:
- Create a testfolder
- Create pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "my_package"
authors = []
description = "My package description"
readme = "Readme.md"
requires-python = ">=3.8"
classifiers = [
]
dependencies = ["filip"]
version = "0.1.0"
- Create a virtual environment
python -m venv venv
and activate itvenv/Scripts/activate
- Try to install the example package
pip install .
The installation fails with
igraph uses CMake as the build system. You need to install CMake before compiling igraph.
Build failed for the C core of igraph.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for igraph
Successfully built my-package
Failed to build igraph
ERROR: Could not build wheels for igraph, which is required to install pyproject.toml-based projects
Expected behavior
Dependecies (filip
) are installed from PyPI.
Environment (please complete the following information):
- OS: Windows 10
Hi, I tried to reproduce your error but got another unexpected error with the provided pyproject.toml
. Since I am not that familiar with the pyproject.toml
, I tried another slightly different way to install filip
via venv
:
python -m venv <path\to\venv\filip_207>
<path\to\venv\filip_207>\Scriptes\activate
pip install -U filip
And then filip
is successfully installed in the environment filip_207
.
Will that also work for you?
Working on the same project as @Haifischbecken, I'd say it would be best for filips "up-to-dateness" if it were compatible with a pyproject.toml
installation. Our use case is that we have a tool that uses multiple dependencies, including filip, so it would be ideal to install everything with a single command/file.
Having said that, I slightly adapted the pyproject.toml
script from above to make it work in my environment:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "my_package"
authors = []
description = "My package description"
readme = "Readme.md"
requires-python = ">=3.8"
classifiers = []
dependencies = ["filip"]
version = "0.1.0"
[tool.setuptools]
packages = []
It seems that filip does successfully finish installing, albeit with a few warnings:
WARNING: pydantic 2.4.2 does not provide the extra 'dotenv'
and
DEPRECATION: wget is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for wget ... done
DEPRECATION: stringcase is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for stringcase ... done
DEPRECATION: paho-mqtt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for paho-mqtt ... done
DEPRECATION: genson is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for genson ... done
For reference, I'm using pip 22.3.1
on Python 3.10.9
.
Hi thanks for the responses.
I did some more testing with different versions since I was unsure why it worked on my ubuntu system but not the Windows system. I noticed I had python 3.10 installed on the Ubuntu system but Python 3.11 on the Windows one. The problem seems to be compatibility between igraph 0.9.8 and python 3.11 which makes sense as I found
python-igraph is now tested in Python 3.11.
in the changelog of igraph 0.10.2
I tested the following combination
python 3.11, pip 22.0.2 -> FAIL
python 3.11, pip 23.3.1 -> FAIL
python 3.10, pip 22.0.2 -> SUCCESS
python 3.10, pip 23.3.1 -> SUCCESS
The current version of igraph seems to be compatible with python up to version 3.12.
For the very short term going back to 3.10 might be an option, but I think upgrading to a newer version will be necessary in the future anyways.