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

Option c-core-url does not seem to apply when pip installing via git+https scheme #197

Closed
2 tasks done
yunesj opened this issue Oct 31, 2018 · 5 comments
Closed
2 tasks done
Milestone

Comments

@yunesj
Copy link

yunesj commented Oct 31, 2018

Installing the master / head version of igraph-python and igraph core via:

pip -vvvv install --no-clean git+https://github.com/igraph/python-igraph.git@master --install-option="--c-core-url=https://github.com/igraph/igraph/archive/master.tar.gz"`

downloads igraph-0.7.1.tar.gz rather than the master.tar.gz that I specified:

...
    Using temporary directory: /tmp/pip-req-build-oY6XhP/tmp/igraph.Z5WU1h
    Downloading igraph-0.7.1.tar.gz... 100.00%
    Extracting igraph-0.7.1.tar.gz...
...
    In file included from src/indexing.c:25:0:
    src/convert.h:63:57: error: unknown type name ‘igraph_layout_grid_t’; did you mean ‘igraph_matrix_t’?
...
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
error

However, using the same command from the same source dir:

rm -rf /tmp/pip-req-build-oY6XhP/igraphcore
pip -vvvv install --no-clean /tmp/pip-req-build-oY6XhP --install-option="--c-core-url=https://github.com/igraph/igraph/archive/master.tar.gz"`

downloads the correct version of the c-core library and builds fine:

...
    Using temporary directory: /tmp/pip-req-build-u98Ssw/tmp/igraph.fPw9wh
    Downloading master.tar.gz... please wait.
    Extracting master.tar.gz..
...
Successfully installed python-igraph-0.7.1.post6

OS: Ubuntu 18.04.1
Python: Python 2.7.15rc1 in virtualenv
PIP: pip 18.1

Also, I'd like to note that the calculation and display of version numbers was confusing:

    We will now try to download and compile the C core from scratch.
    Version number of the C core: 0.7.1.post6
    We will also try: 0.7.1

    Using temporary directory: /tmp/pip-req-build-u98Ssw/tmp/igraph.fPw9wh
    Downloading master.tar.gz... please wait.
    Extracting master.tar.gz...
    Bootstrapping igraph...
    Finding out version number/string... 0.8.0-pre+a76038e

Thanks!

  • This issue is for the Python interface of igraph.
  • This issue is a bug report or a feature request, not a support question.
@sophiamaedler
Copy link

I have had the same issue. Your comments above finally led me to a successful build, but I am still unable to use python-igraph. When I try and import using import igraph as ig I get the following error message:

>>> import igraph as ig Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/pstore/data/bioinfo/users/maedlers/source_code/python-igraph/igraph/__init__.py", line 34, in <module> from igraph._igraph import *

Was wondering if this is the same for you?

@ntamas
Copy link
Member

ntamas commented Nov 7, 2018

@Artemis-R I'm pretty sure that your error is unrelated to the original issue; I think that the problem is simply that you are standing right in the directory that contains the source code of python-igraph. If you went through the usual python setup.py install dance successfully, just change to any other folder that is not the source code of python-igraph and run import igraph from there.

@yunesj Could it be a pip-related issue? I mean, could it be the case that pip does not forward --install-option to the setup.py invocation when building a source tree checked out from git? (I don't know why this would be the case, but for me it seems like this is what's happening behind the scenes).

This is the relevant line from the output of pip -vvvv install when using a git repo:

Running command /Users/tamas/.local/share/virtualenvs/python-igraph-EeMdo40k/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/0w/bq71k6b143gfxp8521kmfbyr0000gn/T/pip-req-build-xum8qu30/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/0w/bq71k6b143gfxp8521kmfbyr0000gn/T/pip-wheel-yk779hg6 --python-tag cp37

As you can see, pip seems to call python setup.py bdist_wheel -d some-temporary-folder --python-tag cp37 in a somewhat convoluted way. The switches specified in --install-option are not passed to it.

@yunesj
Copy link
Author

yunesj commented Nov 13, 2018

Yes, it seems likely a pip-related issues.

Does this pip ticket show the same symptoms? pypa/pip#5576

@ntamas
Copy link
Member

ntamas commented Nov 13, 2018

Yes, it seems similar.

@vtraag vtraag added this to the 0.8.0 milestone Aug 21, 2019
@ntamas
Copy link
Member

ntamas commented Jan 10, 2020

The --c-core-url option is now gone; igraph's source code is vendored so it should not be needed any more. Closing the issue.

@ntamas ntamas closed this as completed Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants