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

pip3 install is missing dependencies #22

Closed
donpdonp opened this issue Jul 26, 2014 · 17 comments
Closed

pip3 install is missing dependencies #22

donpdonp opened this issue Jul 26, 2014 · 17 comments

Comments

@donpdonp
Copy link

$ sudo pip3 install rainbowstream
Successfully installed rainbowstream python-dateutil requests pyfiglet SQLAlchemy twitter Pillow six
Cleaning up...

$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

$ sudo pip3 install HTMLParser 
Successfully installed HTMLParser
$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
  File "/usr/lib64/python3.3/site-packages/HTMLParser.py", line 11, in <module>
    import markupbase
ImportError: No module named 'markupbase'

$ fuuuuuuuuuuuuuuuu
@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

HI @donpdonp , there are several problems here. Let's fix it one by one.

  • rm -rf ~/.rainbow_config.json if it exists.
  • sudo pip3 uninstall HTMLParser (python3 shouldn't use this package)
  • Please uninstall rainbowstream and install it again, let me know if it still not work.

@donpdonp
Copy link
Author

hi DTVD. .rainbow_config.json does not exist. The first run of rainbowstream complained of the missing HTMLParser. If I remove it, wont it simply give the same error again?

@donpdonp
Copy link
Author

$ sudo pip3 uninstall HTMLParser
Uninstalling HTMLParser:
  Successfully uninstalled HTMLParser
$ sudo pip3 uninstall rainbowstream
Uninstalling rainbowstream:
  Successfully uninstalled rainbowstream
$ sudo pip3 install rainbowstream
Downloading/unpacking rainbowstream
  Downloading rainbowstream-0.4.7.tar.gz
$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

I saw the line
It seems that ~/.rainbow_config.json has wrong format :(
and think it might exists and has something wrong with it's format.

By default when install rainbowstream it will create a brand new ~/.rainbow_config.json file.
Does ls ~/.rainbow_config.json really show nothing ?

@donpdonp
Copy link
Author

$ cat ~/.rainbow_config.json
cat: /home/donp/.rainbow_config.json: No such file or directory
$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

I'm sorry, I will take time to look at this problem carefully :(
Thank you very much for reporting.
At this time please try the virtualenv solution instead

virtualenv -p /path/to/python3 venv3
source venv3/bin/activate
pip list # confirm that this is a brand new virtualenv
pip install rainbowstream

@donpdonp
Copy link
Author

when using sudo pip3 install, the installer put the config file in root's home directory.

$ sudo ls -l /root/.rainbow_config.json
-rw-r--r-- 1 root root 984 Jul 25 17:50 /root/.rainbow_config.json

I moved it to my home directory, but still get the same error

$ sudo mv /root/.rainbow_config.json ~
$ sudo chown donp .rainbow_config.json
$ rainbowstream
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

You are right about the installer, it's my bad.

And HTMLParser error is really strange.
In Python3 support module, I expect it would jump to except.

Can you try the same thing as the link above in your Python interpreter and let me know the result ?

@donpdonp
Copy link
Author

donp@sirius ~ $ virtualenv venv
Using base prefix '/usr'
New python executable in venv/bin/python3.3
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
donp@sirius ~ $ source venv/bin/activate
(venv)donp@sirius ~ $ pip list
pip (1.5.6)
setuptools (3.6)
(venv)donp@sirius ~ $ pip install rainbowstream
Downloading/unpacking rainbowstream
.....
Successfully installed rainbowstream python-dateutil requests pyfiglet SQLAlchemy twitter Pillow six
Cleaning up...
(venv)donp@sirius ~ $ rainbowstream
Traceback (most recent call last):
  File "/home/donp/venv/lib/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module
>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

Oops it's really strange. Could you specify which Linux (or OSX) you are using?
Could you try the following python code ?

DTVD@DTVD-Air :: ~ -->> python3.4
Python 3.4.1 (default, Jul 11 2014, 20:08:42) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
...     from HTMLParser import HTMLParser
...     unescape = HTMLParser().unescape
... except:
...     from html import unescape
... 
>>> unescape
<function unescape at 0x100644d90>
>>> 

@donpdonp
Copy link
Author

(venv)donp@sirius ~ $ python3.3
Python 3.3.3 (default, Mar 23 2014, 11:22:07)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
...     from HTMLParser import HTMLParser
...     unescape = HTMLParser().unescape
... except:
...     from html import unescape
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ImportError: No module named 'HTMLParser'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
ImportError: cannot import name unescape

@donpdonp
Copy link
Author

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

Thanks very much for pointing it out 👍 . I will add the support asap.

@donpdonp
Copy link
Author

also I am using Gentoo which is not recommending python 3.4 yet.
http://packages.gentoo.org/package/dev-lang/python

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

I just released v0.4.9 Pleae update with pip install -U rainbowstream and let me know if it still not work

@donpdonp
Copy link
Author

looks good!

(venv)donp@sirius ~ $ pip install -U rainbowstream
Downloading/unpacking rainbowstream from https://pypi.python.org/packages/source/r/rainbowstream/ra
inbowstream-0.4.9.tar.gz#md5=ed7fd1aee355ae6222f9efdd8c65a3fa
  Downloading rainbowstream-0.4.9.tar.gz

...
Cleaning up...
(venv)donp@sirius ~ $ rainbowstream
Hi there! We're gonna get you all set up to use Rainbow Stream.

In the web browser window that opens please choose to Allow
access. Copy the PIN number that appears on the next page and paste or
type it here:

@orakaro
Copy link
Owner

orakaro commented Jul 26, 2014

Thanks very much again 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants