Replit downgrades my libraries and removes when I install a new library

**Question: Whenever I install a new python library replit removes pycparser and downgrades my libraries when attempting to update **


As you can see in the screenshot pycparser was removed and and other libraries were downgraded. I did not ask for this it simply happens every single time I try install a new library. This is very annoying because I need to manually update each time.
Screenshots, links, or other helpful context:

code snippet

If poetry is downgrading packages, this most likely means that there are compatibility issues with the python versions.
In the pyproject.toml file under the [tool.poetry.dependencies] section, there is a python “package” specifying the allowed python versions. You can try to modify this to fix the issue, such as by removing the max version cap.
Note that this might lead to dependency conflicts (but poetry will tell you a possible solution).


I found the package section. How do I remove the max version cap? Do I just set the versions to empty strings?
Screenshot 2023-10-27 at 9.58.21 PM

Instead of

python = ">=3.8.0,<3.9"

you can set it to

python = ">=3.8.0"

Notice that the python version no longer is limited to under 3.9.0 (<3.9)

1 Like

Thank you, it seems to have worked. Just to clarify I only needed to change the first line

python = ">=3.8.0,<3.9"

and I dont need to manually change any of the other specified versions?

You shouldn’t need to, because the program reads the Python version and upgrades/removes packages based on that.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.