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

Missing kafka module on fresh pip install frontera #173

Closed
decentral1se opened this issue Jul 15, 2016 · 3 comments
Closed

Missing kafka module on fresh pip install frontera #173

decentral1se opened this issue Jul 15, 2016 · 3 comments

Comments

@decentral1se
Copy link

My working versions:

(test-frontera)[cortex][integrate-frontera] ⚡ λ python --version                                                                                                      [node-5.5.0][ruby-2.2.1]
Python 2.7.6
(test-frontera)[cortex][integrate-frontera] ⚡ λ pip --version                                                                                                         [node-5.5.0][ruby-2.2.1]
pip 7.1.2 from /home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages (python 2.7)

Install frontera in a fresh 2.7.6 virtualenv:

(test-frontera)[cortex][integrate-frontera] ⚡ λ pip install frontera                                                                                                  [node-5.5.0][ruby-2.2.1]
Collecting frontera
/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not availabl
e. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#in
secureplatformwarning.
  InsecurePlatformWarning
  Downloading frontera-0.5.2.2-py2-none-any.whl (91kB)
    100% |████████████████████████████████| 94kB 3.5MB/s 
Collecting six>=1.8.0 (from frontera)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting w3lib>=1.10.0 (from frontera)
  Using cached w3lib-1.14.3-py2.py3-none-any.whl
Installing collected packages: six, w3lib, frontera
Successfully installed frontera-0.5.2.2 six-1.10.0 w3lib-1.14.3
/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not availabl
e. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#in
secureplatformwarning.
  InsecurePlatformWarning
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Import fails due to missing kafka module:

(test-frontera)[cortex][integrate-frontera] ⚡ λ python                                                                                                                [node-5.5.0][ruby-2.2.1]
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import frontera
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/frontera/__init__.py", line 1, in <module>
    from core.manager import FrontierManager
  File "/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/frontera/core/manager.py", line 5, in <module>
    from frontera.settings import Settings, BaseSettings
  File "/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/frontera/settings/__init__.py", line 4, in <module>
    import default_settings
  File "/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/frontera/settings/default_settings.py", line 2, in <module>
    from kafka.protocol import CODEC_NONE
ImportError: No module named kafka.protocol

Passing the [kafka] option, things work:

(test-frontera)[cortex][integrate-frontera] ⚡ λ pip install frontera[kafka]                                                                                           [node-5.5.0][ruby-2.2.1]
Requirement already satisfied (use --upgrade to upgrade): frontera[kafka] in /home/lwm/.virtualenvs/test-frontera/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.8.0 in /home/lwm/.virtualenvs/test-frontera/lib/python2.7/site-packages (from frontera[kafka])
Requirement already satisfied (use --upgrade to upgrade): w3lib>=1.10.0 in /home/lwm/.virtualenvs/test-frontera/lib/python2.7/site-packages (from frontera[kafka])
Collecting kafka-python<=0.9.5 (from frontera[kafka])
/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not availabl
e. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#in
secureplatformwarning.
  InsecurePlatformWarning
  Downloading kafka-python-0.9.5.tar.gz (73kB)
    100% |████████████████████████████████| 77kB 6.8MB/s 
Building wheels for collected packages: kafka-python
  Running setup.py bdist_wheel for kafka-python
  Stored in directory: /home/lwm/.cache/pip/wheels/b2/e9/31/8184d8862de3ef9d23539652ba83c3ab124e86a69957c9f601
Successfully built kafka-python
Installing collected packages: kafka-python
Successfully installed kafka-python-0.9.5
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(test-frontera)[cortex][integrate-frontera] ⚡ λ python                                                                                                                [node-5.5.0][ruby-2.2.1]
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import frontera
>>> 

If I run pip install frontera, I shouldn't get the kafka error, given that these 'options' are optional? If not, the documentation should be updated:

@sibiryakov
Copy link
Member

Thanks @lwm, this will be fixed soon!

@sibiryakov
Copy link
Member

Fixed with latest release.

@decentral1se
Copy link
Author

Confirmed!

(test-frontera)[test-frontera] λ pip --version                                                                                                                        [node-5.5.0][ruby-2.2.1]
pip 7.1.2 from /home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages (python 2.7)
(test-frontera)[test-frontera] λ python --version                                                                                                                     [node-5.5.0][ruby-2.2.1]
Python 2.7.6
(test-frontera)[test-frontera] λ pip install frontera                                                                                                                 [node-5.5.0][ruby-2.2.1]
Collecting frontera
/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading frontera-0.5.2.3-py2-none-any.whl (91kB)
    100% |████████████████████████████████| 94kB 4.6MB/s 
Collecting six>=1.8.0 (from frontera)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting w3lib>=1.10.0 (from frontera)
  Using cached w3lib-1.14.3-py2.py3-none-any.whl
Installing collected packages: six, w3lib, frontera
Successfully installed frontera-0.5.2.3 six-1.10.0 w3lib-1.14.3
/home/lwm/.virtualenvs/test-frontera/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(test-frontera)[test-frontera] λ python                                                                                                                               [node-5.5.0][ruby-2.2.1]
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import frontera
>>> # win!
... 
>>> 

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

No branches or pull requests

2 participants