Having problem on running every code no packages installed in repels

Question:

I am facing this problem every time i try to run code or I fork repel to learn .

IN Console tab first thing pops up is the:
** packager with this message**

poetry add replit
Using version ^3.3.2 for replit

Updating dependencies
Resolving dependencies...

  SolverProblemError

  The current project's Python requirement (3.8.12) is not compatible with some of the required packages Python requirement:
    - replit requires Python >=3.9,<4.0, so it will not be satisfied for Python 3.8.12
  
  Because no versions of replit match >3.3.2,<4.0.0
   and replit (3.3.2) requires Python >=3.9,<4.0, replit is forbidden.
  So, because repl-nix-blackjack-start depends on replit (^3.3.2), version solving failed.

  at venv/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 replit, a possible solution would be to set the `python` property to "<empty>"

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

and then interpret portion runs my code and when i no longer want to run my code i have to click the stop button manually in order to stop the process.

I really need some assistance. Please help me out

Hey, @Sumit-KumarKu93 welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

here is link to repl - https://replit.com/@Sumit-KumarKu93/blackjack-start

Try just running poetry remove replit in the Shell tab.

Just saw why that’s failing. As a workaround, change replit in your main file to firepup650. (My package, which has the same clear command as replit does)

That might fail to get added automatically, if it does, just run poetry add firepup650 in the Shell.

(The other solution here would be to upgrade your .replit file to a new python version, which can break certain python programs)

1 Like

@Sumit-KumarKu93 Or, you can use my natedhaliwal package and use the clear() command:

import natedhaliwal
natedhaliwal.clear()

To install it, enter poetry add natedhaliwal.

You importing a clear function? Just create your own and minimize dependencies.
On a side note, installing replit package does not work and this might be something that needs to be fixed.

1 Like