{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/pyzmq/issues/1240","repository_url":"https://api.github.com/repos/zeromq/pyzmq","labels_url":"https://api.github.com/repos/zeromq/pyzmq/issues/1240/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/pyzmq/issues/1240/comments","events_url":"https://api.github.com/repos/zeromq/pyzmq/issues/1240/events","html_url":"https://github.com/zeromq/pyzmq/issues/1240","id":379384368,"node_id":"MDU6SXNzdWUzNzkzODQzNjg=","number":1240,"title":"Pyzmq -  from . import (constants, error, message, context,","user":{"login":"brubakerjeff","id":6541166,"node_id":"MDQ6VXNlcjY1NDExNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/6541166?v=4","gravatar_id":"","url":"https://api.github.com/users/brubakerjeff","html_url":"https://github.com/brubakerjeff","followers_url":"https://api.github.com/users/brubakerjeff/followers","following_url":"https://api.github.com/users/brubakerjeff/following{/other_user}","gists_url":"https://api.github.com/users/brubakerjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/brubakerjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brubakerjeff/subscriptions","organizations_url":"https://api.github.com/users/brubakerjeff/orgs","repos_url":"https://api.github.com/users/brubakerjeff/repos","events_url":"https://api.github.com/users/brubakerjeff/events{/privacy}","received_events_url":"https://api.github.com/users/brubakerjeff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-10T03:08:11Z","updated_at":"2018-11-19T05:41:46Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm working on a program that imports Pyzmq. I upgraded to pyzmq-17.1.2 installed through pip. The base program is running through python 2.7, inside of termux and pyzmq was installed through pip. I'm receiving the following error. I isolated it to the following. Any help or pointers would be appreciated. Should the python3.7 work with python2.7 as well, or should I perhaps be using an older version? \r\n\r\npyzmq is installed using \r\npip install pyzmq (also tried with adding  --install-option=\"--zmq=bundled\")\r\n\r\nIs this configuration working a zmq dependency? Is there an easy way to install that with termux?\r\n\r\n--- test .py\r\n\r\n```python\r\nimport zmq\r\nprint('do nothing')\r\n```\r\n\r\n```\r\n$ python2 test.py \r\nTraceback (most recent call last):\r\n  File \"test.py\", line 1, in <module>\r\n    import zmq\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/__init__.py\", line 47, in <module>\r\n    from zmq import backend\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/__init__.py\", line 40, in <module>\r\n    reraise(*exc_info)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/__init__.py\", line 27, in <module>\r\n    _ns = select_backend(first)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/select.py\", line 27, in select_backend\r\n    mod = __import__(name, fromlist=public_api)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/cython/__init__.py\", line 6, in <module>\r\n    from . import (constants, error, message, context,\r\nImportError: cannot import name constants\r\n```\r\n\r\npython3 appears to give more details\r\n\r\n```\r\npython3 test.py \r\nTraceback (most recent call last):\r\n  File \"test.py\", line 1, in <module>\r\n    import zmq\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/__init__.py\", line 47, in <module>\r\n    from zmq import backend\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/__init__.py\", line 40, in <module>\r\n    reraise(*exc_info)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/utils/sixcerpt.py\", line 34, in reraise\r\n    raise value\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/__init__.py\", line 27, in <module>\r\n    _ns = select_backend(first)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/select.py\", line 27, in select_backend\r\n    mod = __import__(name, fromlist=public_api)\r\n  File \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/cython/__init__.py\", line 6, in <module>\r\n    from . import (constants, error, message, context,\r\nImportError: dlopen failed: cannot locate symbol \"zmq_strerror\" referenced by \"/data/data/com.termux/files/usr/lib/python3.7/site-packages/zmq/backend/cython/error.cpython-37m.so\"...\r\n```"},"comment":{"url":"https://api.github.com/repos/zeromq/pyzmq/issues/comments/439777654","html_url":"https://github.com/zeromq/pyzmq/issues/1240#issuecomment-439777654","issue_url":"https://api.github.com/repos/zeromq/pyzmq/issues/1240","id":439777654,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTc3NzY1NA==","user":{"login":"brubakerjeff","id":6541166,"node_id":"MDQ6VXNlcjY1NDExNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/6541166?v=4","gravatar_id":"","url":"https://api.github.com/users/brubakerjeff","html_url":"https://github.com/brubakerjeff","followers_url":"https://api.github.com/users/brubakerjeff/followers","following_url":"https://api.github.com/users/brubakerjeff/following{/other_user}","gists_url":"https://api.github.com/users/brubakerjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/brubakerjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brubakerjeff/subscriptions","organizations_url":"https://api.github.com/users/brubakerjeff/orgs","repos_url":"https://api.github.com/users/brubakerjeff/repos","events_url":"https://api.github.com/users/brubakerjeff/events{/privacy}","received_events_url":"https://api.github.com/users/brubakerjeff/received_events","type":"User","site_admin":false},"created_at":"2018-11-19T05:41:46Z","updated_at":"2018-11-19T05:41:46Z","author_association":"NONE","body":"@mink after a lot of work I was able to compile zmq. I can run in c but still struggling with the pyzmq wrapper. Any pointers? Does pip2 do any compilation work?\r\n$ cat test.c\r\n//  Hello World client\r\n#include <zmq.h>\r\n#include <string.h>\r\n#include <stdio.h>\r\n#include <unistd.h>\r\n\r\nint main (void)\r\n{\r\n    printf (\"Connecting to hello world server…\\n\");\r\n    void *context = zmq_ctx_new ();\r\n    void *requester = zmq_socket (context, ZMQ_REQ);\r\n    zmq_connect (requester, \"tcp://localhost:5555\");\r\n\r\n    int request_nbr;\r\n    for (request_nbr = 0; request_nbr != 10; request_nbr++) {\r\n        char buffer [10];\r\n        printf (\"Sending Hello %d…\\n\", request_nbr);\r\n        zmq_send (requester, \"Hello\", 5, 0);\r\n        zmq_recv (requester, buffer, 10, 0);\r\n        printf (\"Received World %d\\n\", request_nbr);\r\n    }\r\n    zmq_close (requester);\r\n    zmq_ctx_destroy (context);\r\n    return 0;\r\n}\r\n$ gcc test.c -lzmq -latomic -o test\r\n$ ./test\r\nConnecting to hello world server…\r\nSending Hello 0…\r\n\r\n$ pip2 install pyzmq\r\nRequirement already satisfied: pyzmq in /data/data/com.termux/files/usr/lib/python2.7/site-packages\r\n$ cat test.py\r\nimport zmq\r\n$ python2 test.py\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 1, in <module>\r\n    import zmq\r\n  File \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/__init__.py\", line 47, in <module>\r\n    from zmq import backend\r\n  File \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/backend/__init__.py\", line 40, in <module>\r\n    reraise(*exc_info)\r\n  File \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/backend/__init__.py\", line 27, in <module>\r\n    _ns = select_backend(first)\r\n  File \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/backend/select.py\", line 27, in select_backend\r\n    mod = __import__(name, fromlist=public_api)\r\n  File \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/backend/cython/__init__.py\", line 6, in <module>\r\n    from . import (constants, error, message, context,\r\nImportError: dlopen failed: cannot locate symbol \"zmq_strerror\" referenced by \"/data/data/com.termux/files/usr/lib/python2.7/site-packages/zmq/backend/cython/error.so\"...\r\n\r\n"}}
{"actor":{"display_login":"brubakerjeff"}}