[Python] Problem creating app with py2app: misssing rubicon

Discussão em 'Python' iniciado por Stack, Março 7, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to create an app from my python script on mac. Every time I've tried to create it by running $ python setup.py py2app in terminal I get an error " ImportError: No module named 'rubicon' ". I know that rubicon is installed.

    I've been trying to find a solution for a while. If it helps, here is my setup file (I made sure that all modules being imported are already installed through pip).

    `setup.py:

    import os
    from setuptools import setup

    APP = ['main.py']

    OPTIONS = {
    'argv_emulation': True,
    'iconfile': 'icons8-automation-64.png'
    }

    # Get the path to the data_folder relative to the setup.py script
    data_folder_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data_folder')

    # List of data files to include in the app bundle
    DATA_FILES = [
    ('data_folder', [os.path.join(data_folder_path, filename) for filename in os.listdir(data_folder_path)])
    ]

    setup(
    name='AchToCRM',
    app=APP,
    data_files=DATA_FILES, # Include the data_folder in the app bundle
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
    install_requires=[
    'selenium',
    'pandas',
    'openpyxl',
    'pyautogui'
    ]
    )`


    This is my first post to stack overflow so thank you for bearing with me.

    I have uninstalled it and reinstalled rubicon multiple times, I've also confirmed that rubicon exists in the venv folder. When I run pip show rubicon-objc in terminal it shows Name: rubicon-objc Version: 0.4.6

    Continue reading...

Compartilhe esta Página