Open PranavMahajan25 opened 5 years ago
Have you solved this issue?
Add this into the root init file. from pymobility import models
And, modify the child init file as: from pymobility.models.mobility import *
Could you specify what you meant by child init file?
File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pymobility-0.1.0-py3.6.egg/pymobility/models/__init__.py", line 1, in <module> ModuleNotFoundError: No module named 'mobility'
This is the error I get whenever I try to import any mobility model, say running the command:from pymobility.models.mobility import random_waypoint
Butimport pymobility
doesn't give any errors. I've followed the installation steps exactly as in readme file. Is it due topython setup.py install
? I've used this repo before and it worked fine.
I got the same issue, did u find the reason.
Well, what I did is that I move mobility.py from the pymobility/src/pymobility/models directory to pymobility/src/pymobility. Then I change in simulation.py code
from pymobility.models.mobility import gauss_markov, reference_point_group, \ tvc, truncated_levy_walk, random_direction, random_waypoint, random_walk
to
from mobility import gauss_markov, reference_point_group, \ tvc, truncated_levy_walk, random_direction, random_waypoint, random_walk
So it doesn't need to directly import from lib library instead directly from same directory as the simulation.py directory. Hope this helps.
I think the main issue was that there are two python binaries in your laptop and python setup.py install
only installs the python2 egg the author has set up. python3 setup.py install
should work fine to install the python3 egg to run your python3 code
File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pymobility-0.1.0-py3.6.egg/pymobility/models/__init__.py", line 1, in <module> ModuleNotFoundError: No module named 'mobility'
This is the error I get whenever I try to import any mobility model, say running the command:from pymobility.models.mobility import random_waypoint
Butimport pymobility
doesn't give any errors. I've followed the installation steps exactly as in readme file. Is it due topython setup.py install
? I've used this repo before and it worked fine.