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

ModuleNotFoundError: No module named 'urlpath' #100

Closed
igrangel opened this issue Jan 28, 2021 · 6 comments
Closed

ModuleNotFoundError: No module named 'urlpath' #100

igrangel opened this issue Jan 28, 2021 · 6 comments
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@igrangel
Copy link

After successfully following the instruction for the installation I got, over and over, the following error. I have installed it in a Conda environment.

@ceteri ceteri self-assigned this Jan 30, 2021
@ceteri ceteri added the bug Something isn't working label Jan 30, 2021
@ceteri ceteri added this to the Release 0.2.x milestone Jan 30, 2021
@ceteri ceteri added this to To do in kglab Jan 30, 2021
@ceteri ceteri moved this from To do to In progress in kglab Jan 30, 2021
@ceteri ceteri closed this as completed in b3fe38f Jan 30, 2021
ceteri added a commit that referenced this issue Jan 30, 2021
prep for release 0.1.7; attempt to resolve #100 #101
@ceteri ceteri reopened this Jan 30, 2021
@ceteri
Copy link
Collaborator

ceteri commented Jan 30, 2021

Thank you very much @igrangel -- and great meeting you at the PyData SoCal meetup.

I've been trying to recreate this, and I'm not sure which dependencies that Conda are picking up. There's a new release of kglab v0.1.7 on PyPi just a few minutes ago, with an attempt to resolve this issue.

So far, kglab has support for making Pip installs on top of Conda, although not building Conda packages directly. We'd run into some issues with attempts at building Conda packages, due to some of the dependencies. Using the "Pip atop Conda" approach has worked so far, although I'm very eager to hear about edge cases, if not!

There's a file called meta.yaml that would become part of a potential Conda package build process. Since we weren't using it directly, I had assumed that Conda would ignore it. However, possibly not. I've just updated the dependencies described within that file, as part of the v0.1.7 release.

If you do a pip install -U kglab update on top of the Conda environment now, does that resolve the issue?

If not, another temporary workaround could be simply pip install urlpath explicitly. That should resolve those errors. FWIW, that urlpath library only gets used if you supply a URL as a file path for one of the serialization methods, which is less common.

Also, may I ask about which environment you're using?

  • Py version
  • OS

Many thanks -
Paco

@igrangel
Copy link
Author

Thank you @ceteri , I think the idea of the library is great and was awesome to see your presentation as well as the term Graph-Based Data Science.
The previous issue is solved by using the pip install urlpath.
After that, I was asked to install other packages, e.g., rdflib, igraph, etc. Which I did, then I had the following issue.

DeprecationWarning Traceback (most recent call last)
in
----> 1 import kglab
2
3 namespaces = {
4 "wtm": "http://purl.org/heals/food/",
5 "ind": "http://purl.org/heals/ingredient/",

c:[my_path]\knowledge_graph\kglab\kglab_init_.py in
1 from .kglab import KnowledgeGraph
2
----> 3 from .subg import Subgraph, SubgraphMatrix, SubgraphTensor
4
5 from .topo import Measure, Simplex0, Simplex1

c:[my_path]\knowledge_graph\kglab\kglab\subg.py in
9 from kglab.pkg_types import NodeLike, RDF_Node, RDF_Triple
10
---> 11 import igraph as ig # type: ignore
12 import networkx as nx # type: ignore
13 import pyvis.network # type: ignore

~.conda\envs\datascience\lib\site-packages\igraph_init_.py in
6 license = "MIT"
7
----> 8 raise DeprecationWarning("To avoid name collision with the igraph project, "
9 "this visualization library has been renamed to "
10 "'jgraph'. Please upgrade when convenient.")

DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to 'jgraph'. Please upgrade when convenient.

It says its a warning, but actually is an error since the kg object is not built.

@ceteri
Copy link
Collaborator

ceteri commented Jan 31, 2021

I should track, which environment you're working in? This will be important for resolving the iGraph error:

  • Py version
  • OS

Also, what approach do you use for installation, given use of Conda?

  • pip install kglab atop a Conda base
  • Git clone, then use of the setup.py
  • Git clone, then use of the requirements.txt

Installation of iGraph is problematic. We may need to back out of support for that.

On the one hand, that library provides better algorithms (e.g., leiden) plus adapters for several popular serialization formats. However, their code isn't native Python and their installer is flaky: there's been some name collision with another project on PyPi, and in tests the problems encountered appear to differ widely on different OS.

We'll do a quick point release of kglab to make iGraph optional – I >think< there's a simple way to resolve that :)

ceteri added a commit that referenced this issue Feb 1, 2021
WIP to resolve issues with igraph install #100
@ceteri
Copy link
Collaborator

ceteri commented Feb 1, 2021

Just pushed the v0.1.8 release, which removes the igraph dependency.
Now you should be able to use:

pip install -U kglab

Does that resolve the installation issues with igraph ?

Thank you @igrangel for working with me on these issues.

@igrangel
Copy link
Author

igrangel commented Feb 1, 2021

Well, now it worked! Thanks @ceteri. Already testing things out.

@ceteri
Copy link
Collaborator

ceteri commented Feb 1, 2021

Wonderful, so glad to hear! :)

@ceteri ceteri closed this as completed Feb 3, 2021
@ceteri ceteri moved this from In progress to Done in kglab Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
kglab
  
Done
Development

No branches or pull requests

2 participants