Results 1 to 2 of 2

Thread: ImportError: No module named 'netifaces'

  1. #1
    Join Date
    Nov 2017

    Smile ImportError: No module named 'netifaces'

    Hey everyone, I'm extremely new here and I apologize if this question has been asked before (I searched already posted but it kept 404ing me when I tried to look in the posts) But I have sort of a weird error I can't figure out what to do. I know it has to do with python.

    My code:
    python3 -u phillip/ --load saves/Fox_Vs_Any --gpu
    Traceback (most recent call last):
      File "phillip/", line 12, in <module>
        import netifaces
    ImportError: No module named 'netifaces'
    I've tried a couple of different fixes such as
    sudo python install
    sudo pip install netifaces
    I just get
    Requirement already satisfied: netifaces in /usr/local/lib/python2.7/dist-packages/netifaces-0.10.6-py2.7-linux-x86_64.egg

    If you want some context on what I'm doing it's installing a silly AI for a game I like:

    If you need more information just let me know

    Thanks in advanced for your guy's help I'm really enjoying the system so far!

  2. #2
    Join Date
    Dec 2014

    Re: ImportError: No module named 'netifaces'

    Python 2.x and 3.x are rather different from each other. You've got a netifaces module for Python 2.7 but are running your program with python3. You need a netifaces module for Python3. I don't know how to do this with pip, but on current Ubuntus there is a package python3-netifaces in the repositories, so "apt install python3-netifaces" should help.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts