Ask coding questions

← Back to all posts
restrictedpython wont work any ideas?
takipsizAD (1)

restricted python wont work any idea? it is error with poetry and i cant change python version

Answered by BD103 (139) [earned 5 cycles]
View Answer
BD103 (139)

Basically, two of your dependencies are overlapping, like this:

Imagine you want to include two different packages, foo and bar. Foo requires that your Python version is greater than 3.8.8, while Bar requires your Python version to not be 3.8.9. Poetry has no clue what to do, so it raises and error.

I've looked at the package, and it should have allowed 3.8 Python, but I think Poetry might be bugged. Try doing this instead in the Shell:

$ poetry lock
$ poetry install
$ python

This is a temporary solution, and doesn't work with the run button. Maybe copy the pyproject.toml data and try making it again. (Use poetry init, and then poetry add pkg_name.)

I hope this helps!

takipsizAD (1)

i also tried overwriting pyproject.tomls python requirement and repl it changed it back

BD103 (139)

I forked your program, and re-wrote pyproject.toml. This didn't fix anything, so that was not the problem. I realized that replit is trying to auto-add restrictedpython, so I deleted your lines 1-4 in, and it fixed everything. Hope that works! @takipsizAD

takipsizAD (1)

@BD103 thanks ( i already know how to fix with removing lines