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

ImportError: cannot import name 'ImageTk' from 'PIL' #45

Open
Cavorticus opened this issue May 10, 2021 · 1 comment
Open

ImportError: cannot import name 'ImageTk' from 'PIL' #45

Cavorticus opened this issue May 10, 2021 · 1 comment

Comments

@Cavorticus
Copy link

Describe the bug
Error received when running 'python main.py --help' or 'python3 main.py --help' per installation instructions.
I have Python v2.7.18 and Python v3.9.2

To Reproduce
Install instructions list the following command to test:
'python main.py --help'

Expected behavior
The expected behavior is to display the Lucifer help information:
_Usage: main.py [-h] [-l LOGGER_LOC] [-g] [-a] [-S] [-T]

Lucifer

optional arguments:
-h, --help show this help message and exit
-l LOGGER_LOC, --log-commands LOGGER_LOC
Enables Command Logging To File
-g, --gui Enables The Gui Mode
-a, --auto-set-vars Enables Auto Setting of Vars On Module Load
-S, --skip-requirements-check
Skips the checking of requirements within lucifer
-T, --test Runs all the lucifer tests_

Solution
For Python v2
sudo apt-get install python-imaging python-pil.imagetk

For Python v3
sudo apt-get install python3-pil python3-pil.imagetk

For Archlinux:
sudo pacman -S python-pillow

It will install the package and you can use it: from PIL import ImageTk

Desktop (please complete the following information):

  • OS: Kali Linux
  • Version: 2021.1
  • Extra Additional Info: Python v2.7.18 and Python v3.9.2

After updating 'python3-pil python3-pil.imagetk', was able to run --help with Python3. Was not able to run using Python v2 even after update.

@Skiller9090
Copy link
Owner

Thank you for the feedback, i will be looking at ways to make it more understandable of how to install Lucifer and add more backward compatibility support

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