Rock Paper Scissors Tensorflow issue

Hi everyone,
I am trying to implement a Hidden Markov Model using tensorflow as in the lectures in order to pass the RPS project.
The issue came when I try to import ‘tensorflow’ and ‘tensorflow_probabilities’ inside I have tried to modify the ‘poetry.lock’ and ‘pyproject.toml’ to avoid loading version ‘4.2.1’ (tensorflow) because inside python3.8 there is already a version ‘2.2.0’ (tensorflow). However, I haven’t been able to solve it.

Any idea how to solve this?
Thank you in advance.

Here is the error Updating package configuration

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

Updating dependencies
Resolving dependencies…

Package operations: 7 installs, 6 updates, 0 removals

  • Updating cachetools (4.2.1 → 4.2.2)
  • Updating google-auth (1.29.0 → 1.30.0)
  • Updating grpcio (1.37.0 → 1.32.0)
  • Updating numpy (1.20.2 → 1.19.5)
  • Installing tensorboard-data-server (0.6.0)
  • Installing cloudpickle (1.6.0)
  • Installing decorator (5.0.7)
  • Installing dm-tree (0.1.6)
  • Installing flatbuffers (1.12)
  • Updating tensorboard (2.2.2 → 2.5.0)
  • Updating tensorflow-estimator (2.2.0 → 2.4.0)
  • Installing tensorflow (2.4.1)

Command [’/opt/virtualenvs/python3/bin/pip’, ‘install’, ‘–no-deps’, ‘tensorflow==2.4.1’] errored with the following return code -9, and output:
Collecting tensorflow==2.4.1

exit status 1 Package operation failed.

Your code so far

Inside of
import tensorflow_probability as tfp
import tensorflow as tf

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36.

Challenge: Rock Paper Scissors

Link to the challenge:

Unfortunately, I don’t see a good solution other than potentially paying for the upgrade on replit. All my attempts to install tensorflow and tensorflow_probabilities caused me to exceed limits on the basic service and the processes were killed. (That is what is also causing the error that you posted)

Thank you for your reply. I’ll try to make it work on Google Colabs for fun and find out a different approach for implementation.

That’s pretty poor form for the first project of this "free"codecamp course, imho.

If you create and train the model in Colabs, you could just import the finished thing into Replit, without the need of importing a lot of libraries.

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