Giter VIP home page Giter VIP logo

Comments (12)

skramm avatar skramm commented on June 15, 2024 1

Fixed ! Here are my steps:

  1. get latest matplotlib (2.0.2 at present)
  2. install it using python3 instead of python (see http://matplotlib.org/users/installing.html ),
  3. do the opensnitch install process as described
  4. done, sudo opensnitch runs

Thanks for support !

from opensnitch.

MartinIngesen avatar MartinIngesen commented on June 15, 2024

Can you do a pip show matplotlib?
If that doesn't work, try running import matplotlib; matplotlib.__version__ on your system.

It seems like you are using a matplotlib that doesn't support QT5 and you have to update that to get opensnitch working.

from opensnitch.

skramm avatar skramm commented on June 15, 2024

Can you do a pip show matplotlib?

Sure:

$ pip show matplotlib
---
Name: matplotlib
Version: 1.3.1
Location: /usr/lib/pymodules/python2.7
Requires: numpy, python-dateutil, tornado, pyparsing, nose

you have to update that to get opensnitch working

Thanks, if I understand correctly what is happening, its my package manager that only provides the 1.3.1 version, and I need another (more recent?) version. So, yeah, not directly related to opensnitch, but more a dependency problem. But what is the minimal version required ?

from opensnitch.

adisbladis avatar adisbladis commented on June 15, 2024

You are actually having a few different problems

Ubuntu 14.04 is not packaging PyQt5. Ubuntu 14.04 is ancient by now.

We haven't made any official decision about this but me personally would like to be able to use fairly new libraries and such. I would say that our baseline should be the latest Ubuntu LTS which is 16.04.

Also you are trying to run on Python 2, as you can see in https://github.com/evilsocket/opensnitch/blob/master/bin/opensnitch#L1 Opensnitch is Python 3.
I just created a PR that makes install.py crap out on this #47

from opensnitch.

skramm avatar skramm commented on June 15, 2024

Ubuntu 14.04 is ancient by now.

Well, Ubuntu 14.04 is an LTS and is supposed to "last" 5 years...

I would say that our baseline should be the latest Ubuntu LTS which is 16.04.

I understand that choice, of course. Given limited resources, you can't support all OSes.

Also you are trying to run on Python 2

No. I am trying to run opensnitch, period ;-) What it does under the hood, I don't (want to) know.
But I see you changed some stuff in the install process in #47, I'll check that out and get back here in a day or 2, please don't close.
Also changed my python alias, but for some reason it seems to stay on 2.7 (at least matplotlib, I have to investigate...)

And thanks anyway, keep on the good job.

from opensnitch.

adisbladis avatar adisbladis commented on June 15, 2024

That Ubuntu 14.04 is "supported" (as in by Ubuntu, not by us) only means that it's receiving security and bug fixes, not that it's guaranteed to run new software.
I'm sorry if I sound a bit dismissive but I really think that one of the advantages of working on a new project is that you can depend on stuff that is a bit bleeding edge.

@evilsocket Can we close this one?

from opensnitch.

skramm avatar skramm commented on June 15, 2024

That Ubuntu 14.04 is "supported" [...] only means that it's receiving security and bug fixes, not that it's guaranteed to run new software.

Sure, got that. But as a standard Linux box and given the required packages, it "should" be able to make new stuff work. Seems this isn't so obvious, unfortunately...

Conclusion: I'm almost sure this is indeed not related to opensnitch but to Python and its infamous 2 vs. 3 problem. What I did:

  • removed with OS package manager my matplotlib package
  • got latest matplotlib (git clone) and installed (python setup.py install)
    but still, always stuck with python 2.7:
$ pip show matplotlib
---
Name: matplotlib
Version: 2.0.2-4065.gde2755c
Location: /usr/local/lib/python2.7/dist-packages/matplotlib-2.0.2_4065.gde2755c-py2.7-linux-x86_64.egg
Requires: numpy, six, python-dateutil, backports.functools-lru-cache, subprocess32, pytz, cycler, pyparsing

So you can close this issue if you feel it should be, I'll post here if I find any solution.

from opensnitch.

adisbladis avatar adisbladis commented on June 15, 2024

@skramm You might get it to work by actually using python3: http://packages.ubuntu.com/trusty/python3 and http://packages.ubuntu.com/trusty/python3-pip and then invoking python3 and pip3 respectively.
With that said the packages in 14.04 are ancient and I would not be surprised if there are some things that are not there.

If I was you I would just get with the times and upgrade ;)

from opensnitch.

skramm avatar skramm commented on June 15, 2024

I do have both python2 and python3. The problem is more related to the fact that with my distro, the default is python2. I'll try to manually change the symlinks, but this is probably going to break lots of other stuff.

If I was you I would just get with the times and upgrade ;)

Yeah, makes sense. But stability and long-term support is crucial to me, so I'm kinda reluctant.

from opensnitch.

MarkoShiva avatar MarkoShiva commented on June 15, 2024

from opensnitch.

arielf avatar arielf commented on June 15, 2024

There's no reason why not to have python3 and python2 side-by-side on the same system. No need to mess with symlinks. I have both versions and everything works great (granted I run 16.04, not 14.04 which may be a bit harder due to other dependencies).

Using 2.7.12 as the default python and using explicit python3 (or pip3 etc.) for programs that require it.

opensnitch just needs to ensure python3 is used wherever it is required.

There's still at least one reference to python in the README.md Install section (sudo python setup.py install). This needs to be changed to sudo python3 setup.py install - trivial to fix.

Thanks!

from opensnitch.

skramm avatar skramm commented on June 15, 2024

No need to mess with symlinks

Yes, I confirm. I did it, and a lot of stuff started acting weird and/or crashing on my machine! Quickly reverted to original...

from opensnitch.

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.