新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Python 3 boxsdk

新規投稿

コメント

6件のコメント

  • jcleblanc

    Hi ,

     

    The Python SDK will support both Python 2 and 3 out of the box. It could be that the program you're trying to run was written with Python 2.x syntax, but if you write your own Python 3.x scripts with the SDK it'll work. 

     

    - Jon

    0
    コメントアクション パーマリンク
  • TPark_RL

    Jon -

        Thanks for the reply.  You're probably right, but the script croaks on the first line:

    from boxsdk import OAuth2, Client

     

    This occurs when I execute it using: "python3 boxInit.py"

    If instead I use "python boxInit.py" it doesn't croak, and the user ID gets printed.  

     

    boxInit.py is from your documentation:

    from boxsdk import OAuth2, Client

    auth = OAuth2(
    client_id='',
    client_secret='',
    access_token=',
    )
    client = Client(auth)

    user = client.user().get()
    print('The current user ID is {0}'.format(user.id))

     

    Seems pretty simple.  Any ideas?

               Tom

         

    0
    コメントアクション パーマリンク
  • Ashishintuit

    Hi Team,

    I'm seeing the same issue on my local. FYI I have python 3 installed o. my local but for some reason I get "

    ModuleNotFoundError: No module named 'boxsdk'" this eeror. Any help is appreciated.

     

    Ashish

    1
    コメントアクション パーマリンク
  • Debasis Dash

    Even I am getting the same error

    1
    コメントアクション パーマリンク
  • Manish Singh

    I also faced same issue where I created a new project using Python 3.10

    0
    コメントアクション パーマリンク
  • Sixuan Li

    not sure if it helps... i upgraded pip first and do 

    python3 -m pip install boxsdk it then works.......

     

    was on python3.8.11

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。