Skip to content

When I run a game script, players module is not found #24

@BastienPasdeloup

Description

@BastienPasdeloup

At some point during installation, we ask you to create a directory pyrat_workspace using the command:

python3 -c "import pyrat; pyrat.init_workspace()"

This commandt not only creates the directory with default games and players, butit also adds an entry to the Python PATH to allow you to import the players subdirectory. If after creating the workspace you move or rename your pyrat_workspace directory to something else, then players is no longer found by Python.

To solve this issue, follow these steps:

  1. In a terminal, activate your virtual environment where PyRat is installed.
  2. Run the following command, changing the path in parentheses to the actual path of your PyRat workspace:

python3 -c "import pyrat; pyrat.init_workspace('path/to/new/workspace')"

Metadata

Metadata

Assignees

No one assigned

    Labels

    during gameProblems that appear when playing a PyRat gamesolvedThis problem has a solution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions