Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not add a specific module. #225

Closed
MarketingPip opened this issue Dec 17, 2021 · 4 comments
Closed

Can not add a specific module. #225

MarketingPip opened this issue Dec 17, 2021 · 4 comments

Comments

@MarketingPip
Copy link

I reviewed this before posting.
#104

Trying to add option to allow users to paste anytime with CTRL-V.

Code I am trying to make an executable file from to test.

import readline
readline.parse_and_bind("control-v: paste")
test = print(input("insert paste"))
print(test)

I am pointing my path to /site-packages/pyreadline with no luck. But I do not believe this is needed tho at all.

Error printed is

Traceback (most recent call last):
File "paste.py", line 1, in
ModuleNotFoundError: No module named 'readline'
[5812] Failed to execute script 'paste' due to unhandled exception!

Thank you for any help in advanced.

@MarketingPip MarketingPip changed the title Can not import a specific module. Can not add a specific module. Dec 17, 2021
@brentvollebregt
Copy link
Owner

Have you run this script on the same machine you're packaging it with (using Python) before packaging it with auto-py-to-exe?

@MarketingPip
Copy link
Author

Yes I have, I do believe it is some kind of error with PyInstaller itself. Hence I have attached the exact code to re-produce the error on your end. As well the older issue code - that has the suggestions attached on how to fix this problem. Other scripts I tested seemed to import modules fine. Hope you're having a great weekend in advanced Brent!

@brentvollebregt
Copy link
Owner

Do you have multiple installations of Python installed on your machine? Sometimes I see people install a package in one installation and auto-py-to-exe in another installation - which will show a missing module like this error. Just want to be 100% sure that this is not occurring.

@MarketingPip
Copy link
Author

Yes I do. But I had everything set correctly.

Did some playing, tried uninstalling the package in same python install path auto-py-exe is in and installing it again. Moved the python code to another area in computer. Then tried to build my file & the exe file built and worked normally for whatever reason.

Then to see if I could document the solution, I tried uninstalling the path I have auto-py-to-exe in. And duplicating the python code/file in the other Python Path I was using to build from that I was having errors from before. Not the same python path I have auto-py-exe installed in. But that file built successfully too.

Was hoping to document a solution for this problem if anyone else had something similar - but I can't seem to figure out what went wrong here! Assuming the error doesn't produce on your computer when trying to build a file using this package? If so - maybe you can push an issue to pyinstaller about this. But you can close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants