toabctl / jiracli

Simple command line interface for Jira
GNU General Public License v3.0
152 stars 39 forks source link

ImportError: cannot import name main #53

Open estahn opened 7 years ago

estahn commented 7 years ago
$ python -V
Python 2.7.13

$ jiracli
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/jiracli", line 6, in <module>
    from jiracli import main
ImportError: cannot import name main
dsizzle commented 7 years ago

I had that issue too, so I created a brand new virtualenv with --always-copy, then ran pip install jira, THEN ran pip install jiracli and it's working.

toabctl commented 7 years ago

Hm. I can not reproduce this. What steps do I need todo for reproducing this? I do:

$ virtualenv-2.7 jira-test
New python executable in /home/tom/tmp/jira-test/bin/python2
Also creating executable in /home/tom/tmp/jira-test/bin/python
Installing setuptools, pip, wheel...done.
tom@basilikum:~/tmp$ source jira-test/bin/ac
activate          activate.csh      activate.fish     activate_this.py  
tom@basilikum:~/tmp$ source jira-test/bin/activate
(jira-test) tom@basilikum:~/tmp$ pip install jiracli
Collecting jiracli
  Downloading jiracli-0.4.8.tar.gz
Collecting pbr>=0.6 (from jiracli)
  Using cached pbr-2.0.0-py2.py3-none-any.whl
Collecting jira>=0.47 (from jiracli)
  Downloading jira-1.0.10-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 99kB/s 
Collecting tabulate (from jiracli)
  Using cached tabulate-0.7.7-py2.py3-none-any.whl
Collecting termcolor (from jiracli)
Requirement already satisfied: six in ./jira-test/lib/python2.7/site-packages (from jiracli)
Collecting requests-toolbelt (from jira>=0.47->jiracli)
  Downloading requests_toolbelt-0.7.1-py2.py3-none-any.whl (53kB)
    100% |████████████████████████████████| 61kB 128kB/s 
Collecting defusedxml (from jira>=0.47->jiracli)
  Downloading defusedxml-0.5.0-py2.py3-none-any.whl
Collecting requests-oauthlib>=0.6.1 (from jira>=0.47->jiracli)
  Downloading requests_oauthlib-0.8.0-py2.py3-none-any.whl
Collecting requests>=2.10.0 (from jira>=0.47->jiracli)
  Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting argparse; python_version < "3.2" (from jira>=0.47->jiracli)
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Collecting ordereddict; python_version < "3.1" (from jira>=0.47->jiracli)
Requirement already satisfied: setuptools>=20.10.1 in ./jira-test/lib/python2.7/site-packages (from jira>=0.47->jiracli)
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.6.1->jira>=0.47->jiracli)
  Downloading oauthlib-2.0.2.tar.gz (125kB)
    100% |████████████████████████████████| 133kB 68kB/s 
Requirement already satisfied: packaging>=16.8 in ./jira-test/lib/python2.7/site-packages (from setuptools>=20.10.1->jira>=0.47->jiracli)
Requirement already satisfied: appdirs>=1.4.0 in ./jira-test/lib/python2.7/site-packages (from setuptools>=20.10.1->jira>=0.47->jiracli)
Requirement already satisfied: pyparsing in ./jira-test/lib/python2.7/site-packages (from packaging>=16.8->setuptools>=20.10.1->jira>=0.47->jiracli)
Building wheels for collected packages: jiracli, oauthlib
  Running setup.py bdist_wheel for jiracli ... done
  Stored in directory: /home/tom/.cache/pip/wheels/fc/ad/02/69a69fa04faf4537d526799728f9d8f7506d83e73347a3ce09
  Running setup.py bdist_wheel for oauthlib ... done
  Stored in directory: /home/tom/.cache/pip/wheels/84/98/7a/fba7268f61097bea6081cbe5480bc439b38975748ea7684fd5
Successfully built jiracli oauthlib
Installing collected packages: pbr, requests, requests-toolbelt, defusedxml, oauthlib, requests-oauthlib, argparse, ordereddict, jira, tabulate, termcolor, jiracli
Successfully installed argparse-1.4.0 defusedxml-0.5.0 jira-1.0.10 jiracli-0.4.8 oauthlib-2.0.2 ordereddict-1.1 pbr-2.0.0 requests-2.13.0 requests-oauthlib-0.8.0 requests-toolbelt-0.7.1 tabulate-0.7.7 termcolor-1.1.0
(jira-test) $ which jiracli
/home/tom/tmp/jira-test/bin/jiracli
(jira-test) $ jiracli -h
usage: jiracli [-h] [--debug] [--no-verify] [--issue-type-list]
               [--issue-link-types-list] [--project-list]
               [--project-list-components project-key] [-m message]
...