QUESTION Import Libary for AC

Discussion in 'Apps' started by RapierXbox, May 1, 2023.

  1. RapierXbox

    RapierXbox New Member

    Joined:
    Apr 29, 2023
    Messages:
    10
    Likes Received:
    3
    Hi. Can anyone help me importing a libary in my python script. I have it installed in my python version but its not in the AC one.
     
  2. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,130
    Likes Received:
    383
  3. RapierXbox

    RapierXbox New Member

    Joined:
    Apr 29, 2023
    Messages:
    10
    Likes Received:
    3
    Hi thanks for you reply i tried it but it still doesnt work i still get the same error: ImportError: no package named _ctypes and i cant install libbi-dev because this version in internal yk
     
  4. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,130
    Likes Received:
    383
    oh ctypes...
    copy stdlib and stdlib64 folders from another app and use this:
    Code:
    import os, sys, platform
    sysdir=os.path.dirname(__file__)+'/stdlib'
    if platform.architecture()[0] == '64bit':
        sysdir=os.path.dirname(__file__)+'/stdlib64'
    sys.path.insert(0, sysdir)
    os.environ['PATH'] = os.environ['PATH'] + ';.'
    import ctypes
    
     
  5. RapierXbox

    RapierXbox New Member

    Joined:
    Apr 29, 2023
    Messages:
    10
    Likes Received:
    3
    Last edited: May 4, 2023
  6. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,130
    Likes Received:
    383
  7. RapierXbox

    RapierXbox New Member

    Joined:
    Apr 29, 2023
    Messages:
    10
    Likes Received:
    3
    works!! thanks so much but no i gotta figure out why its not sending ::(((
     
  8. RapierXbox

    RapierXbox New Member

    Joined:
    Apr 29, 2023
    Messages:
    10
    Likes Received:
    3
    biggest fault on my side in the arduino code i looked for G and S for Go and Stop but in the python code i wrote 0 and 1
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice