ImportError: cannot import name 'constants'

1,998 views
Skip to first unread message

Joel Doerr

unread,
May 24, 2018, 2:00:32 PM5/24/18
to TRex Traffic Generator
Hello,

Looking at the Trex control plane documentation and unable to get past the first step. Do I need to recompile the libs?

[root@trex-tool doc]# uname -a
Linux trex-tool 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Thanks

[root@user-lnx v2.41]# ./trex_daemon_server start
Traceback (most recent call last):
  File "./trex_daemon_server", line 34, in <module>
    import trex_server
  File "/root/v2.41/automation/trex_control_plane/server/trex_server.py", line 9, in <module>
    import zmq
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/__init__.py", line 49, in <module>
    from zmq import backend
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/backend/__init__.py", line 41, in <module>
    reraise(*exc_info)
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/utils/sixcerpt.py", line 34, in reraise
    raise value
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/backend/__init__.py", line 29, in <module>
    _ns = select_backend(first)
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/backend/select.py", line 27, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "/root/v2.41/external_libs/pyzmq-14.5.0/python3/intel/ucs4/64bit/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants'

Yaroslav Brustinov

unread,
May 24, 2018, 3:08:47 PM5/24/18
to Joel Doerr, TRex Traffic Generator
Hi,

What is your Python3 version?
Could you try 2.7 or 3.4 or 3.5

Thanks,
Yaroslav.

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/64f97e83-537d-4371-abbf-51094dc7a7ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel Doerr

unread,
May 24, 2018, 10:43:42 PM5/24/18
to TRex Traffic Generator
Indeed. That fixed the issue going to 2.7.

Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.

Yaroslav Brustinov

unread,
May 25, 2018, 2:13:15 AM5/25/18
to Joel Doerr, TRex Traffic Generator

Hi,

You are welcome, but could you specify which Python3 version you had with the problem?

Thanks,
Yaroslav

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.

dreb...@gmail.com

unread,
May 2, 2019, 7:33:48 AM5/2/19
to TRex Traffic Generator
> To unsubscribe from this group and stop receiving emails from it, send an email to trex...@googlegroups.com.
>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/3242390f-bc8b-4c73-bd10-2b87bfd72395%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Hi Yaroslav,

I am using Trex v2.47 and python 2.7.6 and I have the same issue.
I don't see the issue with Trex v2.42.

Thanks,
Dejan

Yaroslav Brustinov

unread,
May 2, 2019, 7:43:53 AM5/2/19
to dreb...@gmail.com, TRex Traffic Generator
Hi,

You can not have the same issue as ZMQ library was changed between v2.47 and version in original mail.
Please show the error you get.

Thanks,
Yaroslav.



dreb...@gmail.com

unread,
May 2, 2019, 9:57:48 AM5/2/19
to TRex Traffic Generator
Yes, sorry you're right my mistake.
Actually I had some problems with Trex v2.47 build. I cleaned the build and recompile it again and now it's ok.
Reply all
Reply to author
Forward
0 new messages