ReactiveX / RxPY

ReactiveX for Python
https://rxpy.rtfd.io
MIT License
4.81k stars 361 forks source link

Rx 1.2.3 ImportError: No module named subjects #55

Closed chrisber closed 9 years ago

chrisber commented 9 years ago

Using rx either via pip or building the development /master branch results in:

 # python
Python 2.7.9 (default, Sep 11 2015, 21:52:46) 
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rx.subjects import Subject
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rx.py", line 18, in <module>
    from rx.subjects import Subject
ImportError: No module named subjects

from rx.subjects import Subject works inside the RxPy/ sources but not outside. How to fix this?

Any help is highly appreciated.

jdreaver commented 9 years ago

There might be something weird with your installation of python. Have you tried installing from a fresh virtualenv? I just tried it and it worked for me:

$ virtualenv-2.7 venv
New python executable in venv/bin/python2
Also creating executable in venv/bin/python
Installing setuptools, pip, wheel...done.
$ ./venv/bin/pip install rx
Collecting rx
Installing collected packages: rx
Successfully installed rx-1.2.3
$ python
Python 3.4.3 (default, Mar 25 2015, 17:13:50) 
[GCC 4.9.2 20150304 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from rx.subjects import Subject
chrisber commented 9 years ago

Thanks helped.

~ # virtualenv venv
New python executable in venv/bin/python2.7
Also creating executable in venv/bin/python
Installing setuptools, pip, wheel...done.
~ # virtualenv -p /usr/bin/python2.7 venv
Already using interpreter /usr/bin/python2.7
New python executable in venv/bin/python2.7
Not overwriting existing python script venv/bin/python (you must use venv/bin/python2.7)
Installing setuptools, pip, wheel...done.
~ # source venv/bin/activate
(venv)~ #  pip install rx
Collecting rx
Installing collected packages: rx
Successfully installed rx-1.2.3
(venv)~ # python
Python 2.7.9 (default, Sep 11 2015, 21:52:46) 
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rx.subjects import Subject
jdreaver commented 9 years ago

Great! :beers:

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.