Comments (4)
seems that zmq library is not installed
from ns3-gym.
seems that zmq library is not installed
Thanks. I directly used apt-get to install the zmq as the README. And it told me that the libzmq5 has been installed so I didn't notice the library zmq is not found during building.
Note, selecting 'libzmq3-dev' instead of 'libzmq5-dev'
libzmq5 is already the newest version (4.1.4-7ubuntu0.1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libzmq3-dev : Depends: libzmq5 (= 4.1.4-7) but 4.1.4-7ubuntu0.1 is to be installed
E: Unable to correct problems, you have held broken packages.
So I degrade the libzmq5 to 4.1.4-7 and runsudo apt install libzmq5-dev
again. The apt-get told me that the libzmq3-dev is selected instead of libzmq5-dev. I check the packages in the ubuntu source. They didn't supply the libzmq5-dev package. It's kinda weird... Do you use another apt source? Like the PPA of protobuf.
And I also check the source codes of the team zeromq on the Github, I cannot find a repo labeled by version 5.
Building your source with libzmq3-dev throws the following errors.
The first one is that the ByteSize()
is deprecated, so I replace them to ByteSizeLong()
as recommended in the opengym_interface.cc
. It works. I think maybe you should replace them, too, since it is an error from google::protobuf
.
../src/opengym/model/opengym_interface.cc:258:69: error: ‘int google::protobuf::MessageLite::ByteSize() const’ is deprecated: Please use ByteSizeLong() instead [-Werror=deprecated-declarations]
envStateMsg.SerializeToArray(request.data(), envStateMsg.ByteSize());
The second one maybe comes from the libzmq3-dev.
I just found this error is the same as another opening issue.
../src/opengym/model/opengym_interface.cc: In member function ‘void ns3::OpenGymInterface::Init()’:
../src/opengym/model/opengym_interface.cc:192:36: error: ‘zmq::send_flags’ has not been declared
m_zmq_socket.send (request, zmq::send_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc:197:41: error: ‘zmq::recv_flags’ has not been declared
(void) m_zmq_socket.recv (reply, zmq::recv_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc: In member function ‘void ns3::OpenGymInterface::NotifyCurrentState()’:
../src/opengym/model/opengym_interface.cc:259:36: error: ‘zmq::send_flags’ has not been declared
m_zmq_socket.send (request, zmq::send_flags::none);
^~~~~~~~~~
../src/opengym/model/opengym_interface.cc:264:41: error: ‘zmq::recv_flags’ has not been declared
(void) m_zmq_socket.recv (reply, zmq::recv_flags::none);
The zmq::recv_flags
is not declared.
Do you have any ideas about this?
from ns3-gym.
In fact, I'm working on using DRL in ns3 these days, too. So I really appreciate your marvellous jobs on creating gym environments for ns3.
Since I cannot build your files these days, I found another interesting way to use the existing python DRL source codes in ns3. It origins from the document of the waf
tool.
I simply modified the wscript
of the ns3, such that the python scripts can be embedded in to the cpp files as described in Python document.
def options(opt):
# options provided by the modules
opt.load('compiler_c')
opt.load('compiler_cxx')
opt.load('cflags')
opt.load('gnu_dirs')
opt.load('python') # add this command
# other commands
def create_ns3_program(bld, name, dependencies=('core',)):
program = bld(features='cxx cxxprogram pyembed') # modify here
program.is_ns3_program = True
program.name = name
:) But sure, if I can use your framework, my code would be much more readable, considering that embedding python files into the cpp is too ugly, XD
from ns3-gym.
I have recently applied a pull request that replaced the deprecated zmq functions with the new ones:
19bfe0a
Maybe you can revert this commit and check.
from ns3-gym.
Related Issues (20)
- Errors during ./ns3 build procedure HOT 1
- Random Early Detection
- Run the code
- Installation Error HOT 3
- protobuf messages are not generated during build configuration HOT 13
- using gdb to debug ns3-script in a separate shell results into the script restarting HOT 1
- protobuf messages are generated but could not be found during build configuration HOT 1
- Using ns3gym in Sable-Baseline3's Vevtorized Environment HOT 1
- some problem in run cognitive-agent-v1.py HOT 2
- Missing header messages.pb.h for opengym HOT 2
- GNU version still not meets requirement after updating gcc/g++
- ./ns3 configure -d release --enable-examples --enable-tests HOT 2
- ubuntu2210
- implementation of reward and penalty HOT 1
- The `info` returned by `step()` must be a python dictionary, actual type: <class 'str'> HOT 1
- protobuf_generate command not found HOT 3
- Gym is unmaintained, replace it by Gymnasium
- python contrib/opengym/examples/opengym/simple_test.py Got new port for ns3gm interface: 7656 ns3 file not found. Quitting...
- install ns3-gym in tensorflow environment
- NS3 gym stable baseline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ns3-gym.