来自authorizenet.apicontrollers import createTransactionController :: ImportError:无法导入名称请求

时间:2018-05-24 08:17:50

标签: python-requests importerror authorize.net

我使用authorize.net python lib来制作支付网关。我正在关注此链接:

https://github.com/AuthorizeNet/sample-code-python

代码如下:PaymentTransactions/charge-credit-card.py

from authorizenet import apicontractsv1 <br>
from authorizenet.apicontrollers import createTransactionController <br>
def charge_credit_card(amount):<br>
    """
    Charge a credit card
    """

当我运行此文件时,代码抛出此错误:

  

回溯(最近一次呼叫最后):
文件   “C:/development/learning/VueJsLearning/Payment-system/sample-code-python/PaymentTransactions/charge-credit-card.py”,第10行,中
      来自authorizenet.apicontrollers导入createTransactionController文件   “C:\ Python27 \ lib \ site-packages \ authorizenet \ apicontrollers.py”,行   9,在       来自authorizenet import apicontrollersbase
文件“C:\ Python27 \ lib \ site-packages \ authorizenet \ apicontrollersbase.py”,   第11行,在       来自pip._vendor导入请求
文件“C:\ Python27 \ lib \ site-packages \ pip_vendor \ requests__init __。py”,line   83,在       从pip._internal.compat导入WINDOWS
文件“C:\ Python27 \ lib \ site-packages \ pip_internal__init __。py”,第42行,在   
      来自pip._internal import cmdoptions
文件“C:\ Python27 \ lib \ site-packages \ pip_internal \ cmdoptions.py”,第16行,   在       来自pip._internal.index导入(
文件“C:\ Python27 \ lib \ site-packages \ pip_internal \ index.py”,第15行,in   
      来自pip._vendor导入html5lib,请求,六个rootError:无法导入名称请求

0 个答案:

没有答案