Giter Club home page Giter Club logo

Comments (1)

reconSuave avatar reconSuave commented on June 25, 2024

Pyinstaller isn't looking in the right place for dependencies, some things you can try:

tell pyinstaller where discum is:

 --paths "/full_path_to/venv/lib/python3.x/site-packages/discum/"

tell pyinstaller where discum.start is:

 --paths "/full_path_to/venv/lib/python3.x/site-packages/discum/start"

tell pyinstaller to collect everything under discum package:

--collect-all "discum"

tell pyinstaller to collect discum.start as a hidden import:

--hidden-import "discum.start"

if those don't solve it, there are some more exotic options like adding a runtime-hook that imports the discum package and initializes your script, or making discum into a shared library and adding it to the compiled exe and modifying your script to call the functions from the library.

But probably one of the above options, or some combination of those options, will fix it. In all likelihood you just need to tell pyinstaller where to look for dependencies. Also make sure you're running pyinstaller from the same virtual environment where discum is installed. And also on that note, sometimes it can help to make a fresh virtual environment and install the dependencies for your script in the fresh virtual environment, and then install and run pyinstaller in the same environent after dependencies are installed.

Pyinstaller can be finicky sometimes and there are multiple ways you can accomplish the same thing which is kind of annoying and unpythonic but with some experimentation you can usually find a way that works for your situation. Also you might want to consider using the auto-py-to-exe package to initialize pyinstaller, it has some advantages like being able to see all the different options for collecting dependencies so you can try them all systematically in a more organized way, and it gives you verbose output by default. In general it just makes troubleshooting easier.

Hope this helps.

from discord-s.c.u.m.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.