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

startup error #12

Open
dac4755 opened this issue Mar 1, 2018 · 5 comments
Open

startup error #12

dac4755 opened this issue Mar 1, 2018 · 5 comments

Comments

@dac4755
Copy link

dac4755 commented Mar 1, 2018

Hi.

This looks really cool but I get this error on a fresh install:

 (master *) Source $ python main.py 
Traceback (most recent call last):
  File "main.py", line 12, in <module>
    import userInterface
  File "Module/userInterface.py", line 11, in <module>
    from PIL import Image,ImageTk
ImportError: cannot import name ImageTk

I'm running on ubuntu (I also get the same error on Fedora 26). The PIL package doesn't have ImageTK. Is there a certain version I need?

 (master *) Source $ python --version
Python 2.7.14
(master *) Source $ python
Python 2.7.14 (default, Sep 23 2017, 22:06:14) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>> help(PIL)
Help on package PIL:

NAME
    PIL

FILE
    /usr/lib/python2.7/dist-packages/PIL/__init__.py

DESCRIPTION
    # The Python Imaging Library.
    # $Id$
    #
    # package placeholder
    #
    # Copyright (c) 1999 by Secret Labs AB.
    #
    # See the README file for information on usage and redistribution.
    #

PACKAGE CONTENTS
    BdfFontFile
    BmpImagePlugin
    BufrStubImagePlugin
    ContainerIO
    CurImagePlugin
    DcxImagePlugin
    DdsImagePlugin
    EpsImagePlugin
    ExifTags
    FitsStubImagePlugin
    FliImagePlugin
    FontFile
    FpxImagePlugin
    FtexImagePlugin
    GbrImagePlugin
    GdImageFile
    GifImagePlugin
    GimpGradientFile
    GimpPaletteFile
    GribStubImagePlugin
    Hdf5StubImagePlugin
    IcnsImagePlugin
    IcoImagePlugin
    ImImagePlugin
    Image
    ImageChops
    ImageCms
    ImageColor
    ImageDraw
    ImageDraw2
    ImageEnhance
    ImageFile
    ImageFilter
    ImageFont
    ImageGrab
    ImageMath
    ImageMode
    ImageMorph
    ImageOps
    ImagePalette
    ImagePath
    ImageQt
    ImageSequence
    ImageShow
    ImageStat
    ImageTransform
    ImageWin
    ImtImagePlugin
    IptcImagePlugin
    Jpeg2KImagePlugin
    JpegImagePlugin
    JpegPresets
    McIdasImagePlugin
    MicImagePlugin
    MpegImagePlugin
    MpoImagePlugin
    MspImagePlugin
    OleFileIO
    PSDraw
    PaletteFile
    PalmImagePlugin
    PcdImagePlugin
    PcfFontFile
    PcxImagePlugin
    PdfImagePlugin
    PixarImagePlugin
    PngImagePlugin
    PpmImagePlugin
    PsdImagePlugin
    PyAccess
    SgiImagePlugin
    SpiderImagePlugin
    SunImagePlugin
    TarIO
    TgaImagePlugin
    TiffImagePlugin
    TiffTags
    WalImageFile
    WebPImagePlugin
    WmfImagePlugin
    XVThumbImagePlugin
    XbmImagePlugin
    XpmImagePlugin
    _binary
    _imaging
    _imagingcms
    _imagingft
    _imagingmath
    _imagingmorph
    _tkinter_finder
    _util
    _webp
    features

DATA
    PILLOW_VERSION = '4.1.1'
    VERSION = '1.1.7'
    __version__ = '4.1.1'

VERSION
    4.1.1

(END)

@Srinivas11789
Copy link
Owner

Hi @dac4755, Thanks for reporting the issue. I think the work around would be to install imagetk separately,
sudo apt-get install python-imaging-tk
Please try and let me know if this works. I would investigate further on this issue to figure out if this would be required as a separate entity.

@dac4755
Copy link
Author

dac4755 commented Mar 2, 2018

Thanks, that did the trick! I think the problem was primarily on my end with some corrupted packages causing conflicts. I removed the offending packages, installed the one you recommended, and now it runs. Thanks for your help and quick response!

David

@bahaahassanieh
Copy link

cant find any module named userInterface , is there a specific package

@aki2419
Copy link

aki2419 commented Aug 11, 2018

root@blackout:~/Desktop/PcapXray/Source# python main.py
Traceback (most recent call last):
File "main.py", line 12, in
import userInterface
File "Module/userInterface.py", line 5, in
import plotLanNetwork
File "Module/plotLanNetwork.py", line 9, in
import matplotlib.pyplot as plt
File "/usr/lib/python2.7/dist-packages/matplotlib/init.py", line 124, in
from . import cbook
ImportError: cannot import name cbook

I am using Kali Linux... THanks

@Srinivas11789
Copy link
Owner

Srinivas11789 commented Sep 4, 2018

Thanks for the issues. I have some startup fixes pending to merge soon.

@bahaahassanieh - I think the current version of the project requires you to be in the source folder where main.py resides before you can run python main.py. Let me know if this solves the issue. This issue is already fixed due to be merged #7.

@aki2419 - The cbook error is related to the matplotlib library installation. I think the work around here would solve it. I think I should update the requirements file to a specific matplotlib version to solve this. This says matplotlib=2.0.2 fixes the cbook error. I will investigate further and try fixing this from my end but let me know if this still persists.

Also, this seems to get fixed with a python virtualenv setup.

pip install virtualenv
virtualenv <name>
source <name>/bin/activate
pip install -r requirements.txt
  • A docker setup coming soon... (that might solve installation issues)

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

No branches or pull requests

4 participants