tkn-tub / ns3-gym

ns3-gym - The Playground for Reinforcement Learning in Networking Research
GNU General Public License v2.0
521 stars 197 forks source link

Invalid syntax when installing ns3gym python package #40

Closed mghnm closed 3 years ago

mghnm commented 3 years ago

Got an error while trying to install the ns3gym python package:

pip3 install /home/repo/ns3- gym/src/opengym/model/ns3gym Processing /home/repo/ns3-gym/src/opengym/model/ns3gym Collecting pyzmq (from ns3gym===0.1.0) Using cached https://files.pythonhosted.org/packages/d7/4f/2e09600112c1e69ea7eefef3db443d966ae670a5b9fa229fe6eb84e945a4/pyzmq-22.0.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-eqvij9yl/pyzmq/setup.py", line 259 info(f"Found zmq.h in {include_dir}") ^ SyntaxError: invalid syntax

I have the following libzmq installed on Ubuntu 16.04.

libzmq3-dev/xenial-updates,xenial-security,now 4.1.4-7ubuntu0.1 amd64 [installed] libzmq5/xenial-updates,xenial-security,now 4.1.4-7ubuntu0.1 amd64 [installed]

Disclosure: I had an issue with building prior but reverting the commit that changed the depreciated zmq methods worked fine.

mghnm commented 3 years ago

The invalid syntax error occurs due to incorrect python-pip version running the pip command. Python 3 and pip3 didn't work I needed to specify python3.7 specifically when running pip to get it working. python3.7 -m pip install /home/repo/ns3-gym/src/opengym/model/ns3gym