I`m trying to convert a .py script to an .exe
cx_Freeze compiles the exe succesfully. However when I run the exe file it throws this error:
ImportError: The 'appdirs' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution
Here is my setup.py
from cx_Freeze import setup, Executable setup( name = "dbx_sharelink" , version = "0.1" , description = " " , executables = [Executable("dbx_sharelink.py")] , ) Source code Python script
import sys import dropbox import pandas as pd import sys import os dbx = dropbox.Dropbox('xxxxxxxxxxxxxxxxx') def getSharedLink(full_path): try: link = dbx.sharing_create_shared_link(full_path).url except dropbox.exceptions.ApiError as err: print('*** API error', err) return None return link print(sys.argv[1]) link = getSharedLink("/A_DATA/data") df = pd.DataFrame([{'link':link}]) df.to_clipboard(index=False,header=False) os.system("pause") How to resolve this error?