Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

setup.py not installing all dependencies #357

Closed
renanrodrigo opened this issue Apr 19, 2017 · 12 comments
Closed

setup.py not installing all dependencies #357

renanrodrigo opened this issue Apr 19, 2017 · 12 comments

Comments

@renanrodrigo
Copy link
Contributor

Started a new environment and ran python setup.py install for python-openflow, kytos-utils and kytos, and no errors ocurred. However, when I ran kytosd -f, all I've got was:

Traceback (most recent call last):
  File "/home/renan/testes/venv/bin/kytosd", line 3, in <module>
    import daemon
ModuleNotFoundError: No module named 'daemon'
@diraol
Copy link
Contributor

diraol commented Apr 24, 2017

May be we could use this setuptools function to achieve our needs:
https://github.com/pypa/setuptools/blob/e65c45538fab94008b8066edd134725be8f9c400/bootstrap.py#L75

@abaruchi
Copy link
Contributor

@renanrodrigo I run some tests to reproduce the error. I think that the procedure in kytos tutorial may be wrong. Can you please try the following:

for project in python-openflow kytos-utils kytos-napps kytos; do 
cd $project 
pip3.6 install -r requirements.txt -r requirements-dev.txt -r requirements-docs.txt >/tmp/requirements.$project.log 2>&1 
python3.6 setup.py develop >/tmp/setup.$project.log 2>&1 
cd - 
done

Note that s/pip/pip3.6/ and s/python/python3.6/ inside the for looping.

@renanrodrigo
Copy link
Contributor Author

@abaruchi I know it works that way, I'm doing this for a while. But pythons setup.py install should install all dependencies. @macartur posted a bug in setuptools that may be causing this.

@macartur
Copy link
Contributor

This is the issue: pypa/setuptools#456.

@diraol
Copy link
Contributor

diraol commented Apr 24, 2017

@renanrodrigo and @macartur dos this issue affects both install mode and develop mode? or just install?
[I'm working on a solution for us]

@diraol
Copy link
Contributor

diraol commented Apr 24, 2017

Btw, this comment seems to be the real issue for us:
pypa/setuptools#456 (comment)

@renanrodrigo
Copy link
Contributor Author

@diraol develop mode works fine.

@diraol
Copy link
Contributor

diraol commented Apr 24, 2017

Ok, then the problem is the one from this comment:
pypa/setuptools#456 (comment)

If on our Install class (inside setup.py) we call the self.do_egg_install() instead of super().run(), then almost everything works fine.
I mean, the main problem (of installing dependencies) is solved.

The only remaining problem is that, despite the fact that jinja2 is installed by the setup script, it is not available to the setup script itself [the modules available on the Path are not "reloaded"], so we still have to deal with the Jinja2 import error.

diraol pushed a commit to diraol/kytos that referenced this issue Apr 24, 2017
This is a workaround for kytos#357 and also for pypa/setuptools#456

We do still need to solve kytos#370 (jinja2 loading during setup)
diraol pushed a commit to diraol/kytos that referenced this issue Apr 24, 2017
This is a workaround for kytos#357 and also for pypa/setuptools#456

We do still need to solve kytos#370 (jinja2 loading during setup)

FIX kytos#357
@diraol diraol assigned diraol and unassigned abaruchi Apr 24, 2017
macartur added a commit to macartur/kytos that referenced this issue Apr 24, 2017
@cemsbr
Copy link
Contributor

cemsbr commented Apr 26, 2017

#375 also solves this problem.

@diraol
Copy link
Contributor

diraol commented Apr 26, 2017

@cemsbr please, reference the issue on the commit! =)

cemsbr added a commit to cemsbr/kytos that referenced this issue Apr 29, 2017
cemsbr added a commit to cemsbr/kytos that referenced this issue Apr 29, 2017
@beraldoleal
Copy link
Member

@diraol @cemsbr #375 was merged but without reference to here, right ? Can we close this ?

@diraol
Copy link
Contributor

diraol commented May 2, 2017

Yes we can @beraldoleal !

@diraol diraol closed this as completed May 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants