简体   繁体   中英

Unable to import nor install Pyhook (64 or 32) in Python 3.6

This is the line of feedback I am getting. I have tried to follow other people who have asked these questions but the answers usually provided to them are not being beneficial to me. I am running my Python instance inside Spyder. Any assistance or tips would be appreciated.

import pyhook, pythoncom, sys, logging
Traceback (most recent call last):

  File "<ipython-input-3-413e5591e9f3>", line 1, in <module>
    import pyhook, pythoncom, sys, logging

ModuleNotFoundError: No module named 'pyhook'

pip install pyHook-1.5.1-cp27-none-win_amd64.whl
  File "<ipython-input-4-00dcce36920f>", line 1
pip install pyHook-1.5.1-cp27-none-win_amd64.whl
          ^
SyntaxError: invalid syntax


pip install pyHook-1.5.1-cp27-none-win32.whl
  File "<ipython-input-5-1c4f31ceb6a2>", line 1
pip install pyHook-1.5.1-cp27-none-win32.whl
          ^
SyntaxError: invalid syntax

It looks like you are trying to run pip inside of Python?

pip is designed as a command line tool and should be run in a command line terminal.

You can, however, run it from inside python by running:

import pip
pip.main(['install', 'pyHook'])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM