Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GMatch4py
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Fize Jacques
  • GMatch4py
  • Issues
  • #3

Closed
Open
Created Oct 23, 2018 by Fize Jacques@jacques.fizeMaintainer

Issue with install with sudo

Created by: daubin427

Hello,

I did a fresh install on an Ubuntu 18.04.1 virtual machine. If I follow the steps in the readme all is fine to install. However when I run an example, I get this output:

  1. git clone https://github.com/Jacobe2169/GMatch4py.git
  2. cd to GMatch4py
  3. sudo python3 setup.py install
  4. All is well

I build a simple setup.py to test:

from distutils.core import setup from Cython.Build import cythonize

setup( ext_modules = cythonize("simpleGmatch4py.pyx") )

I create a simpleGmatch4py.pyx:

Gmatch4py use networkx graph

import networkx as nx

import the GED using the munkres algorithm

import gmatch4py as gm

g1=nx.complete_bipartite_graph(5,4) g2=nx.complete_bipartite_graph(6,4)

ged=gm.GraphEditDistance(1,1,1,1) # all edit costs are equal to 1 result=ged.compare([g1,g2],None) print(result) print("Done")

I build inplace: python3 setup.py build_ext --inplace

I then try to run it and get an error:

python3

import simpleGmatch4py Traceback (most recent call last): File "", line 1, in File "simpleGmatch4py.pyx", line 4, in init simpleGmatch4py import gmatch4py as gm File "/usr/local/lib/python3.6/dist-packages/gmatch4py/init.py", line 4, in from .ged.graph_edit_dist import * File "gmatch4py/ged/graph_edit_dist.pyx", line 1, in init GMatch4py.gmatch4py.ged.graph_edit_dist ModuleNotFoundError: No module named 'GMatch4py'

This error is similar to Issue #2 (closed). In Issue #2 (closed) the virtualenv method works perfectly.

Digging further, If I do the additional steps:

  1. pip3 install numpy networkx scikit-learn ipython cython scipy (Note no sudo here)
  2. python3 setup.py install (Note no sudo here) A. Errors installing in to /usr/local/lib/python3.6/dist-packages
  3. sudo chmod -R 777 /usr/local/lib/python3.6/dist-packages/gmatch4py
  4. python3 setup.py install (Note no sudo here)
  5. Rerun the test above and it works perfectly [[ 0. 14.] [10. 0.]] Done

While I do get it to work, it is not install/working as expected. I hope these details help.

Thank you again for your amazing work! :)

Assignee
Assign to
Time tracking