Tensorflow in Repl it

I can’t use the tensorflow with repl it, the error bellow:

→ python3 -m poetry add tensorflow
Using version ^2.8.0 for tensorflow

Updating dependencies
Resolving dependencies…

SolverProblemError

The current project’s Python requirement (>=3.8,<4.0) is not compatible with some of the required packages Python requirement:
- tensorflow-io-gcs-filesystem requires Python >=3.7, <3.11, so it will not be satisfied for Python >=3.11,<4.0
- tensorflow-io-gcs-filesystem requires Python >=3.7, <3.11, so it will not be satisfied for Python >=3.11,<4.0

Because no versions of tensorflow-io-gcs-filesystem match >0.23.1,<0.24.0 || >0.24.0
and tensorflow-io-gcs-filesystem (0.23.1) requires Python >=3.7, <3.11, tensorflow-io-gcs-filesystem is forbidden.
And because tensorflow-io-gcs-filesystem (0.24.0) requires Python >=3.7, <3.11, tensorflow-io-gcs-filesystem is forbidden.
Because no versions of tensorflow match >2.8.0,<3.0.0
and tensorflow (2.8.0) depends on tensorflow-io-gcs-filesystem (>=0.23.1), tensorflow (>=2.8.0,<3.0.0) requires tensorflow-io-gcs-filesystem (>=0.23.1).
Thus, tensorflow is forbidden.
So, because repl-python3-boilerplate-rock-paper-scissors-2 depends on tensorflow (^2.8.0), version solving failed.

at /opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/puzzle/solver.py:241 in _solve
237│ packages = result.packages
238│ except OverrideNeeded as e:
239│ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240│ except SolveFailure as e:
→ 241│ raise SolverProblemError(e)
242│
243│ results = dict(
244│ depth_first_search(
245│ PackageNode(self._package, packages), aggregate_package_nodes

• Check your dependencies Python requirement: The Python requirement can be specified via the python or markers properties

For tensorflow-io-gcs-filesystem, a possible solution would be to set the `python` property to ">=3.8,<3.11"
For tensorflow-io-gcs-filesystem, a possible solution would be to set the `python` property to ">=3.8,<3.11"

https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers

exit status 1

Replit: Package operation failed.

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36

Challenge: Rock Paper Scissors

Link to the challenge:

There’s your answer (hopefully). Change the pyproject.toml file’s python requirement to that listed. TF needs the <3.11 bit.

TF and poetry can be fiddly sometimes, but poetry can usually (sometimes?) suggest the correct behavior.

as soon as I hit Run the python property in pyproject.toml resets to “^3.8”

Also when hit the ‘+’ button to install tensorflow pyproject.toml resets python to “^3.8”

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