When I first cloned and tried running the project, I had a few problems getting started with dependencies, after running sudo pip install -r requirements.txt.
sudo pip install -r requirements.txt
It might be worth explaining or noting that this project is for Python3 and not Python2. When I run python in my Fedora installation, it feeds me a stacktrace about not being able to import a package. Something worth mentioning up front to a user so they might know and understand if they try running this and receive an error.
python
When running with python3, I received the following stacktraces on first run.
python3
$ python3 stats.py -u jflory7 Traceback (most recent call last): File "stats.py", line 3, in <module> import fedmsg ImportError: No module named 'fedmsg'
The solution for me was running sudo dnf install python3-fedmsg-core (I had the Python2 packages already installed, but not 3).
sudo dnf install python3-fedmsg-core
After this, pygal was a missing dependency, but running sudo dnf install python3-pygal was an easy fix for this.
pygal
sudo dnf install python3-pygal
I'm currently at this point now:
$ python3 main.py -u jflory7 Traceback (most recent call last): File "main.py", line 10, in <module> import output File "/home/jflory/Software/GSoC/gsoc-stats/output.py", line 9, in <module> import grip ImportError: No module named 'grip'
However, I can't find anything in the Fedora repositories or with pip that seems to meet this dependency. Any ideas?
pip
Thanks, hope this helps some. :smile:
Hi Justin,
The initial import error was probably the result of a failed pip install run. Try running sudo pip install -r requirements.pip again.
pip install
sudo pip install -r requirements.pip
I wrote this tool in Python2 (2.7, to be precise) and later added support for Python3, so it should work fine on both :)
From our discussion on IRC, I can pretty much conclude that grip module is bugged and should be replaced / fixed. I'll open a separate issue for it.
grip
Thank you for testing again ;)
@skamath Thanks for reviewing, let me know whenever you need me to test something again. :smile:
As of the moment, if I try generating stats, I have a similar issue again.
$ python main.py -u jflory7 -m svg Traceback (most recent call last): File "main.py", line 6, in <module> import fedmsg File "/usr/lib/python2.7/site-packages/fedmsg/__init__.py", line 25, in <module> import fedmsg.core File "/usr/lib/python2.7/site-packages/fedmsg/core.py", line 36, in <module> import fedmsg.crypto File "/usr/lib/python2.7/site-packages/fedmsg/crypto/__init__.py", line 168, in <module> from . import x509 File "/usr/lib/python2.7/site-packages/fedmsg/crypto/x509.py", line 24, in <module> import requests File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 64, in <module> from . import utils ImportError: cannot import name utils
Did you try sudo pip install utils ?
sudo pip install utils
Use pip3 if you are using Py3 :)
@skamath Everything seems to working well for me now, thanks! I also had a missing dependency for termcolor, but it was easy enough to install.
termcolor
Although, now I am getting a new message I was not receiving before:
No fedmsg.meta plugins found. fedmsg.meta.msg2* crippled
Is there a specific package that will resolve this? I tried checking some, but it appears I have most of them already installed. Wasn't sure if there was a specific one I should look for.
First of all, sorry for the super late reply. I missed this somehow.
Although, now I am getting a new message I was not receiving before: No fedmsg.meta plugins found. fedmsg.meta.msg2* crippled Is there a specific package that will resolve this? I tried checking some, but it appears I have most of them already installed. Wasn't sure if there was a specific one I should look for.
Hmm, looks like it is an issue with fedmsg.meta itself. Can you clone the develop branch and try if it exists. Remember to install the dependencies using sudo pip install -r requirements.pip before you try to run the tool.
Closing this for now. Feel free to re-open this if import errors happen again.
@skamath changed the status to Fixed
Fixed
Login to comment on this ticket.