找不到Python 3.7.4模块错误:没有名为“ faceboook”的模块

时间:2019-09-15 03:16:46

标签: python facebook

C:\Users\test>pip install facebook-sdk

Requirement already satisfied: facebook-sdk in c:\python37\lib\site-packages (3.1.0)
Requirement already satisfied: requests in c:\python37\lib\site-packages (from facebook-sdk) (2.22.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python37\lib\site-packages (from requests->facebook-sdk) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\python37\lib\site-packages (from requests->facebook-sdk) (2019.9.11)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\python37\lib\site-packages (from requests->facebook-sdk) (1.25.3)
Requirement already satisfied: idna<2.9,>=2.5 in c:\python37\lib\site-packages (from requests->facebook-sdk) (2.8)

即使我检查了pip3.7,结果也是一样。

C:\Users\barry.h.yu>pip3.7 install facebook-sdk
Requirement already satisfied: facebook-sdk in c:\python37\lib\site-packages (3.1.0)
Requirement already satisfied: requests in c:\python37\lib\site-packages (from facebook-sdk) (2.22.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python37\lib\site-packages (from requests->facebook-sdk) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\python37\lib\site-packages (from requests->facebook-sdk) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\python37\lib\site-packages (from requests->facebook-sdk) (1.25.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\python37\lib\site-packages (from requests->facebook-sdk) (2019.9.11)
You are using pip version 19.0.3, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
import faceboook
graph = facebook.GraphAPI(access_token='Hide', version='4.0')

print(post['message'])

我尝试卸载pip中的facebook并重新安装,结果还是一样。

错误消息:

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
============== RESTART: C:\Users\barry.h.yu\Desktop\Facebook.py ==============
Traceback (most recent call last):
  File "C:\Users\barry.h.yu\Desktop\Facebook.py", line 1, in <module>
    import faceboook
ModuleNotFoundError: No module named 'faceboook'
>>> 

0 个答案:

没有答案