Reputation: 1
I tried to install ComplexNetworkSim. I followed the instructions that appear here: https://pythonhosted.org/ComplexNetworkSim/installation.html
As recommended, I used setuptools to install NetworkX and SimPy (which are prerequisites for ComplexNetworkSim).
However, when I'm trying to use the package in PyCharm, based on this example:
from ComplexNetworkSim import NetworkAgent, Sim
I get the following error message:
Traceback (most recent call last):
File "C:/Users/Natan/PycharmProjects/final_project_Lev/solution.py", line 1, in <module>
from ComplexNetworkSim import NetworkAgent, Sim
File "build\bdist.win32\egg\ComplexNetworkSim\__init__.py", line 1, in <module>
File "build\bdist.win32\egg\ComplexNetworkSim\agents.py", line 7, in <module>
ImportError: No module named SimPy
Upvotes: 0
Views: 187
Reputation: 1
As mmdanziger suggested, I decided to give up on complexNetworkSim. Instead, I installed nxsim for Python 3 and it works just fine.
Upvotes: 0
Reputation: 4658
Looks like you didn't install simpy
correctly. Maybe it's not in your path. Manual installations can be hard to debug. Unless there is some reason not to, you should use pip
(or another package manager) for installations. Using pip you simply run:
$ pip install complexnetworksim
which leads to the output:
Collecting complexnetworksim
Downloading ComplexNetworkSim-0.1.2.zip (3.3MB)
100% |████████████████████████████████| 3.3MB 715kB/s
Requirement already satisfied: networkx in ./anaconda3/lib/python3.6/site-packages (from complexnetworksim)
Collecting simpy (from complexnetworksim)
Downloading simpy-3.0.10-py2.py3-none-any.whl
Requirement already satisfied: decorator>=4.1.0 in ./anaconda3/lib/python3.6/site-packages (from networkx->complexnetworksim)
Building wheels for collected packages: complexnetworksim
Running setup.py bdist_wheel for complexnetworksim ... done
Stored in directory: ~/.cache/pip/wheels/32/c9/ea/71d1702cf26c7a4d0408ff02fbeadb1ca2e30e28511af11068
Successfully built complexnetworksim
Installing collected packages: simpy, complexnetworksim
Successfully installed complexnetworksim-0.1.2 simpy-3.0.10
But that loads an out-of-date version and still might cause problems. You may want to follow the developer's advice on https://github.com/jschaul/ComplexNetworkSim and use the newer package nxsim
.
Upvotes: 0