找不到Pyinstaller Pynput模块

时间:2020-04-15 13:54:27

标签: python pyinstaller

我已经安装了pyinstaller,已经为脚本配置了PATH,并且在cmd中使用以下命令进行编译时:

C:\ Users \ lucas \ Desktop \ Projects \ Annoying Mouse> pyinstaller -F AnnoyingMouse.py

当我运行.exe文件时,出现一个终端,提示未找到Pynput模块! PLS帮助

from pynput.mouse import Controller
import keyboard, random

mk = Controller()
counter = 0
random_number = 0

while True:
    if keyboard.is_pressed("n") and keyboard.is_pressed("m"):
        break

    if (counter == 20000):
        random_number = random.randint(1, 5)

        if (random_number == 1):
            mk.move(0, -100)
        elif (random_number == 2):
            mk.move(0, 100)
        elif (random_number == 3):
            mk.move(100, 0)
        elif (random_number == 4):
            mk.move(-100, 0)

        counter = 0

    counter += 1
    print(counter)

0 个答案:

没有答案