Kyrluckechuck / TFT-Bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 8.5!
GNU Affero General Public License v3.0
50 stars 7 forks source link

Import keyboard #182

Closed mbn89 closed 1 year ago

mbn89 commented 1 year ago

Everything seemed to go fine with "pip install -r requirements.txt", but I tried to run "py tft.py" and I get this:

C:\Users*\Desktop\TFT-Bot-0.11.10.16>py tft.py Traceback (most recent call last): File "C:\Users*\Desktop\TFT-Bot-0.11.10.16\tft.py", line 12, in import keyboard ModuleNotFoundError: No module named 'keyboard'

I attempted to do a keyboard install with "pip install keyboard" and received this:

C:\Users*\Desktop\TFT-Bot-0.11.10.16\keyboard-master>pip install keyboard Requirement already satisfied: keyboard in c:\users*\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (0.13.5)

I saw a post with someone saying to use K and k for keyboard, changing to pip3 for the command etc. Nothing has worked so far.

akshualy commented 1 year ago

Looks like you're not using a venv, which you really should. Try running py -m venv venv (This will create a venv called venv. Feel free to name it something else by changing the second venv.), then active it by running venv\Scripts\activate. Your command line should now show a (venv) before the regular path. Now you can run pip install -r requirements.txt again to install all libraries freshly into the project instead of installing them globally. Then you should be able to run the bot as normal, just make sure you're always in the virtual environment to interact with the project.

mbn89 commented 1 year ago

Ty, that did the trick. ^_^