Closed shadroo closed 5 years ago
Hello,
Try to install from a git clone and you should fix the working directory to the root project. There is information of how to run it in the readme. This way...
export PYTHONPATH=$PYTHONPATH:/
Best,
El sáb., 3 ago. 2019 20:25, shadroo notifications@github.com escribió:
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
please help me to run your code thanks alot
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AAZCMQHFHQLSVAJ2PUCPF4TQCXEQLA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDGO3YA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZCMQBESCFCWRKZVSGJKKTQCXEQLANCNFSM4IJDTJUQ .
hello sir.. sir i have read your paper Availability-Aware Service Placement Policy in Fog Computing Based on Graph Partitions your implementation based on yafs simulator..
now i am reading your yafs documentation...and want to to implement your example on network topology..
i have install python 2.7 and pip install yafs... command as you suggest on documentation but i received error... the same error above gentleman received..
Traceback (most recent call last):
File "C:\Users\Rohit\Desktop\demo.py", line 1, in
its a humble request to you sir plz provide instruction how to solve this issue in simple word..
thank you very much sir
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
please help me to run your code thanks alot
hello .. have you solved the problem.... if yes then plz tell me how ...? i am also having same issue.
Hi I couldnot run this code. I decided to find another simulator.
On Sat, Aug 17, 2019, 11:22 AM rohit-bhu notifications@github.com wrote:
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
please help me to run your code thanks alot
hello .. have you solved the problem.... if yes then plz tell me how ...? i am also having same issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AMXW4P4NL3ARA3SDOYJFJJDQE6N2DA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE6EQ#issuecomment-522211090, or mute the thread https://github.com/notifications/unsubscribe-auth/AMXW4P54J3WNIHX76PXGTETQE6N2DANCNFSM4IJDTJUQ .
Be in touch .....You belong to which country...?
On Sat, 17 Aug 2019, 12:24 shadroo, notifications@github.com wrote:
Hi I couldnot run this code. I decided to find another simulator.
On Sat, Aug 17, 2019, 11:22 AM rohit-bhu notifications@github.com wrote:
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
please help me to run your code thanks alot
hello .. have you solved the problem.... if yes then plz tell me how ...? i am also having same issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AMXW4P4NL3ARA3SDOYJFJJDQE6N2DA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE6EQ#issuecomment-522211090 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AMXW4P54J3WNIHX76PXGTETQE6N2DANCNFSM4IJDTJUQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AM5KF2WVC3QNRAXLY4HULSLQE6OCLA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE7CQ#issuecomment-522211210, or mute the thread https://github.com/notifications/unsubscribe-auth/AM5KF2R37IN7J5N6IG7RLEDQE6OCLANCNFSM4IJDTJUQ .
Dear,
In my country I am lucky to enjoy holidays...
Reading part of your kindly comments, the problem is your working path https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory)
Has you followed the installation steps that are available in the readme?
Installation
YAFS requires Python 2.7 (Python 3.6 or above is not supported)
Clone the project in your local folder: $ git clone https://github.com/acsicuib/YAFS Install third-libraries with easy_install or pip commands Simpy, Networkx, Numpy, Pandas, tqdm gpxpy, geopy, smopy, shapely, scipy, pyproj Note: Thanks to David for creating a conda dependency installation file: URL https://github.com/davidperezabreu/toshare $ conda env update -f yafs.yml
Getting started & your first execution
To run some folder project you can create a simple bash script, with the following lines (please update the path according with your system) or you can use a python editor such as: Pycharm, Spyder, etc.
export PYTHONPATH=$PYTHONPATH:/
Best, Isaac
El 17 ago 2019, a las 10:35, rohit-bhu notifications@github.com escribió:
Be in touch .....You belong to which country...?
On Sat, 17 Aug 2019, 12:24 shadroo, <notifications@github.com mailto:notifications@github.com> wrote:
Hi I couldnot run this code. I decided to find another simulator.
On Sat, Aug 17, 2019, 11:22 AM rohit-bhu <notifications@github.com mailto:notifications@github.com> wrote:
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
please help me to run your code thanks alot
hello .. have you solved the problem.... if yes then plz tell me how ...? i am also having same issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AMXW4P4NL3ARA3SDOYJFJJDQE6N2DA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE6EQ#issuecomment-522211090 https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AMXW4P4NL3ARA3SDOYJFJJDQE6N2DA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE6EQ#issuecomment-522211090 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AMXW4P54J3WNIHX76PXGTETQE6N2DANCNFSM4IJDTJUQ https://github.com/notifications/unsubscribe-auth/AMXW4P54J3WNIHX76PXGTETQE6N2DANCNFSM4IJDTJUQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AM5KF2WVC3QNRAXLY4HULSLQE6OCLA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE7CQ#issuecomment-522211210 https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AM5KF2WVC3QNRAXLY4HULSLQE6OCLA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QE7CQ#issuecomment-522211210>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AM5KF2R37IN7J5N6IG7RLEDQE6OCLANCNFSM4IJDTJUQ https://github.com/notifications/unsubscribe-auth/AM5KF2R37IN7J5N6IG7RLEDQE6OCLANCNFSM4IJDTJUQ> .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AAZCMQEOS5U43AWXSMBKW2DQE6Z4VA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QGPTI#issuecomment-522217421, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZCMQHGMWGIVUW3FKOUHALQE6Z4VANCNFSM4IJDTJUQ.
thank you for your valuable reply sir....
sir i did the same but i got **from yafs.topology import Topology
ModuleNotFoundError: No module named 'yafs.topology'** error
i tried to understand what you are actually saying about export pythonpath.. i work in idle..and set correct path as per need and it run normal python code... can you plz make a video with small example.. so that i can continue my work. I am new in research work and i followed your paper and now i want to implement your algorithm and some of mi customization ....plz help me sir. i tried to remove this error for last 10 days...
and sorry for spoiling your holidays.
Nevermind, Let’s make it work!!
How are you running the script? Could you send me the sequence of commands ?
El 27 ago 2019, a las 11:13, rohit-bhu notifications@github.com escribió:
thank you for your valuable reply sir....
sir i did the same but i got **from yafs.topology import Topology
ModuleNotFoundError: No module named 'yafs.topology'** error
i tried to understand what you are actually saying about export pythonpath.. i work in idle..and set correct path as per need and it run normal python code... can you plz make a video with small example.. so that i can continue my work. I am new in research work and i followed your paper and now i want to implement your algorithm and some of mi customization ....plz help me sir. i tried to remove this error for last 10 days...
and sorry for spoiling your holidays.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AAZCMQH5VNFVJRCBELNECJ3QGTV4FA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HCJTQ#issuecomment-525214926, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZCMQCM6J4PX2J6RJ4BELDQGTV4FANCNFSM4IJDTJUQ.
Thank you sir for your reply... My friend has successfully run the yafs.. He will help me..
Once again thank you sir
On Tue, 27 Aug 2019, 16:02 Isaac.Lera, notifications@github.com wrote:
Nevermind, Let’s make it work!!
How are you running the script? Could you send me the sequence of commands ?
El 27 ago 2019, a las 11:13, rohit-bhu notifications@github.com escribió:
thank you for your valuable reply sir....
sir i did the same but i got **from yafs.topology import Topology
ModuleNotFoundError: No module named 'yafs.topology'** error
i tried to understand what you are actually saying about export pythonpath.. i work in idle..and set correct path as per need and it run normal python code... can you plz make a video with small example.. so that i can continue my work. I am new in research work and i followed your paper and now i want to implement your algorithm and some of mi customization ....plz help me sir. i tried to remove this error for last 10 days...
and sorry for spoiling your holidays.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AAZCMQH5VNFVJRCBELNECJ3QGTV4FA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HCJTQ#issuecomment-525214926>, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAZCMQCM6J4PX2J6RJ4BELDQGTV4FANCNFSM4IJDTJUQ .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15?email_source=notifications&email_token=AM5KF2RKQO54LEMCIYV4CDLQGT7DNA5CNFSM4IJDTJU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HJCOA#issuecomment-525242680, or mute the thread https://github.com/notifications/unsubscribe-auth/AM5KF2XXXC3MKPL2BPCOFFTQGT7DNANCNFSM4IJDTJUQ .
Hello Sir,
I met the same issue. File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in from yafs.distribution import * ImportError: No module named distribution
I've installed the related tool with python pip -m install XXX(module name). But it could not work. Could you share further more YAFS tutorial (such like a video) ? Thank you.
Its simply a bug/error....
You can solve just by rename "C:\Python27\Lib\site-packages\yafs\Distribution.py" to "C:\Python27\lib\site-packages\yafs\distribution.py" (This works for me.)
Actually in "C:\Python27\lib\site-packages\yafs\core.py" in line 18 "from yafs.distribution import *" where as in directory "C:\Python27\Lib\site-packages\yafs" file name is "Distribution.py" instead of "distribution.py".
So, you can also solve the problem by changing line 18 in "C:\Python27\lib\site-packages\yafs\core.py" from "from yafs.distribution import " to "from yafs.Distribution import "
Hello @MegaCreater , Thanks for your suggestions, but please, you should get YAFS version cloning one specific branch: "master" branch to get YAFS on Python2; or "yafs3" to get the last one with support on Python3. Both versions do not have this issue. The YAFS version in pip-repository is very older and it has some problems as you can see it. Sorry but I do not have had time to update it (...and removed it). Best.
Hi @wisaaco
I've solved this issue within the YAFS on python27. I also tried the YSFA3 since there were some issues on python27. But I find that there would be "error no module named 'yafs'" when I processed the YAFS3. May I have the suggestion to fix this issue? Thanks.
Hello @CYuchin
If you clone the project, YAFS folder is there. However, when you run the script, the python engine does not find it. This is a problem with the python path. You should include all your python packages in your path to ensure their visibility
This is an example to configure a path:
export PYTHONPATH="/your/path/project/YAFS:/your/path/projects/Example/mypolicy/:$PYTHONPATH"
python3 main.py
Best
Hello @wisaaco
I'm working YAFS3 under windows 10. And I also added python/yafs path into environment variables. But I still could not process YAFS3 which said "error no module named 'yafs'". Could you help me to figure out the correct way to configure the path?
I had ever successfully run YAFS on python2.7 but some analyse_results.py could not be worked. So I wanna to try YAFS3. Thank you for your time to read this.
B.R.
Sorry, I am not a frequent user windows....but with a correct definition of the path should be work. Have do you test PyCharm IDE? It integrates the working path automatically to run your python scripts, and it has a free version.
Hello @wisaaco, Yes! I also tested PyCharm IDE. And it present another error such like syntax error. So I turn back to run the YAFS3 within windows cmd (powershell), and get the following message:
Traceback (most recent call last):
File "main.py", line 16, in
Thanks for your swift response.
Hello @MegaCreater , Thanks for your suggestions, but please, you should get YAFS version cloning one specific branch: "master" branch to get YAFS on Python2; or "yafs3" to get the last one with support on Python3. Both versions do not have this issue. The YAFS version in pip-repository is very older and it has some problems as you can see it. Sorry but I do not have had time to update it (...and removed it). Best.
Respected @wisaaco sir, I don't think its because of pip. Sir plz can you refer me the link for yafs3 ?
Hello @wisaaco, Yes! I also tested PyCharm IDE. And it present another error such like syntax error. So I turn back to run the YAFS3 within windows cmd (powershell), and get the following message:
Traceback (most recent call last): File "main.py", line 16, in from yafs.core import Sim File "C:\python36\lib\site-packages\yafsinit.py", line 11, in from yafs.core import Sim File "C:\python36\lib\site-packages\yafs\core.py", line 1007 print "-"40 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("-"40)?
Thanks for your swift response.
Dear @subwayi , As you got "SyntaxError: Missing parentheses in call to 'print'. Did you mean print("-"*40)?", its simply mean "print" in "C:\python36\lib\site-packages\yafs\core.py" is used as statement (as earlier used in python2) but in python3 it is a function so you just have to use it as function (i.e add "parentheses" on line 1007). Edit "C:\python36\lib\site-packages\yafs\core.py", line 1007 make it print("-"*40) from print "-"*40. But there may be more error like this. So You had to check whole life or simply run it, if got you error correct again repeat this step.
Dear @MegaCreater and @subwayi ,
I think that both have an old branch of YAFS. Please, check well which branch you have downloaded. You can clone a specific branch, using the following line:
git clone --branch <branchname> <remote-repo-url>
git clone --branch YAFS3 https://github.com/acsicuib/YAFS
As you can see in the github code, In the new branch (YAFS3), there is no such line (print "-"*40) https://github.com/acsicuib/YAFS/blob/YAFS3/src/yafs/core.py
Please, check the lib requirements and check the pythonpath to avoid all those problems. Best,
Dear @MegaCreater and @subwayi ,
I think that both have an old branch of YAFS. Please, check well which branch you have downloaded. You can clone a specific branch, using the following line:
git clone --branch <branchname> <remote-repo-url> git clone --branch YAFS3 https://github.com/acsicuib/YAFS
As you can see in the github code, In the new branch (YAFS3), there is no such line (print "-"*40) https://github.com/acsicuib/YAFS/blob/YAFS3/src/yafs/core.py
Please, check the lib requirements and check the pythonpath to avoid all those problems. Best,
Dear @MegaCreater and @subwayi ,
I think that both have an old branch of YAFS. Please, check well which branch you have downloaded. You can clone a specific branch, using the following line:
git clone --branch <branchname> <remote-repo-url> git clone --branch YAFS3 https://github.com/acsicuib/YAFS
As you can see in the github code, In the new branch (YAFS3), there is no such line (print "-"*40) https://github.com/acsicuib/YAFS/blob/YAFS3/src/yafs/core.py
Please, check the lib requirements and check the pythonpath to avoid all those problems. Best,
Respected @wisaaco sir, I got error while installing:-
git clone --branch YAFS3 https://github.com/acsicuib/YAFS
cd /content/YAFS/
python setup.py build
python3 setup.py install
.......
SyntaxError: invalid syntax
File "/usr/local/lib/python3.6/dist-packages/yafs-0.3.0-py3.6.egg/examples/PartitionILPPlacement/analyse_results_debug.py", line 67
print g,"\t",len(dtmp[g]),"\t",invalid,"\t",over
^
SyntaxError: invalid syntax
File "/usr/local/lib/python3.6/dist-packages/yafs-0.3.0-py3.6.egg/examples/PartitionILPPlacement/main.py", line 178
print "Deploying app: ",aName
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Deploying app: ",aName)?
..........
All error are due to print function. The "print" function is used as statement as in python2, it should be use as a function as print() {with parentheses}.
File: https://colab.research.google.com/drive/1HxuchRQD05kb2KcyVNhmWR6F5Tc9f7DM?usp=sharing
YAFS is not a pure library since it includes several examples in the main project. The idea of YAFS3 is to remove all of them in a close future. That is why you cannot perform a setup.py (python3 setup.py install, it is like a pip installation). It won't work because the examples are not updated to the new version and I don't want them to be because they shouldn't be part of the library.
To make it work: clone the project, import the core libraries, configure the pythonpath and that's is all. Best
Dear @MegaCreater Here you have an example of how to include YAFS in your scenario implementation: https://github.com/acsicuib/MARIO/tree/MarioII
Hello @wisaaco,
Hope you are doing well!
I have tried to clone YAFS3 branch and trying to export command. After running main1.py file, I am getting the following errors:
(newenv) sonia@sonia-HP-Pavilion-Laptop-15-cs3xxx:~/Desktop/Sem2/FogandEdgeComputing/Lab/YAFS$ python3 src/examples/Tutorial/main1.py
Traceback (most recent call last):
File "src/examples/Tutorial/main1.py", line 12, in
I have installed all required dependencies and packages. Still getting the same error. Please let me know how to proceed further.
Thanks in advance!
Hello @soniaghongadi
The "examples" folder contains all YAFS1.0 previous examples. That print is a function of python2.X.
Check the tutorial_scenarios folder. It contains current working examples.
Best
Hello @wisaaco, Thanks for your previous reply. I tried the tutorial_scenarios folder and had the same errors for the print statements. So, I did change the print statements from core.py and init.py files.
But now I am getting following errors:
(newenv) sonia@sonia-HP-Pavilion-Laptop-15-cs3xxx:~/Desktop/Sem2/FogandEdgeComputing/Lab/YAFS$ python3 src/tutorial_scenarios/basicExample/main.py
Traceback (most recent call last):
File "src/tutorial_scenarios/basicExample/main.py", line 14, in
Could you please guide me on this? Thanks in advance!
Hello Sonia,
I don't understand your changes in core and init.py. If you get the last branch, with clone, all the files are ok. It's not necessary to change anything. And the other error is related to your modification. The function "deterministic_distribution" is in line 21 as you can see in the file: https://github.com/acsicuib/YAFS/blob/YAFS3/src/yafs/distribution.py. Please, clone the last branch and use this code in your export classpath. git clone --branch YAFS3 https://github.com/acsicuib/YAFS
Dear @MegaCreater and @subwayi ,
I think that both have an old branch of YAFS. Please, check well which branch you have downloaded. You can clone a specific branch, using the following line:
git clone --branch <branchname> <remote-repo-url> git clone --branch YAFS3 https://github.com/acsicuib/YAFS
As you can see in the github code, In the new branch (YAFS3), there is no such line (print "-"*40) https://github.com/acsicuib/YAFS/blob/YAFS3/src/yafs/core.py
Please, check the lib requirements and check the pythonpath to avoid all those problems. Best,
Dear @wisaaco sir.,
Good day! I tried to run YAFS3 on PyCharm IDE within Ubuntu. Then, I got the message: "Process finished with exit code 0". But there was no test result output. Did you meet this situation when running PyCharm? Thanks.
Dear @wisaaco sir.,
Good day! I tried to run YAFS3 on PyCharm IDE within Ubuntu. Then, I got the message: "Process finished with exit code 0". But there was no test result output. Did you meet this situation when running PyCharm? Thanks.
It should be in your bin directory. Look your bin directory. Where u r looking for results?
Hi @wisaaco
I still could not find the test result in /bin directory. It is possible another folder that YAFS test result would be? The test result was present in YAFS folder when I run YAFS 2.0 within Windows. Since I could not use that one now, so I try to run YAFS3.0 within Ubuntu.
Thanks.
Hi @subwayi
Could do you explain to me in detail the "main.py" file that you try run?
YAFS3 is the best option. If you run the "main.py" file of each folder example/tutorial, the respective folders will contain the *.csv files -the results-.
Best!
Hi @wisaaco
I upgraded Pychram version to be 2021.1.1 to run YAFS-YAFS3/src/examples/Tutorial/main1.py. There was different output message but I still did not get the*.csv files. Could you help to make a suggestion for this situation? Thanks.
Please refer to the following message: _/usr/bin/python3.6 /home/parallels/PycharmProjects/djangoProject2/manage.py runserver 8000 Performing system checks...
Watching for file changes with StatReloader System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. May 09, 2021 - 10:27:03 Django version 3.1.7, using settings 'djangoProject2.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C._
All these messages are not from YAFS. Are you sure that you're running the specific py file from any folder of the yafs project?. You are running a DJANGO script.
Hi @wisaaco
I thought that YAFS pyhton script could be run under DJANGOproject. So I open the *.py file from YAFS src within Pycharm DJANGOproject.
I'm trying to find the way to create yafs project in Pycharm and will feedback to you if there is any.
Hi @wisaaco
I downloaded the YAFS3 package and run it by Pycharm. There were the same error message that Sonia present before. I tried to run some of main.py of YAFS examples (Tutorial/, VRGameFog-IFogSim-WL/ ,Tutorial_JSONModelling/ ,DynamicWorkload/), and got different error as following.
May I have the advice to correct these errors? Thanks.
1.Tutorial/main1:
/usr/bin/python3.6 /home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main1.py
Traceback (most recent call last):
File "/home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main1.py", line 12, in
Process finished with exit code 1
2.Tutorial/main2: /usr/bin/python3.6 /home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main2.py File "/home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main2.py", line 159 print "-"20 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("-"20)?
Process finished with exit code 1
3.Tutorial/main3: /usr/bin/python3.6 /home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main3.py File "/home/parallels/Desktop/YAFS-YAFS3/src/examples/Tutorial/main3.py", line 176 print "-"20 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("-"20)?
Process finished with exit code 1
Please @subwayi, try to read the readme and the rest of the tutorial resources. All of them are not perfect but at least contain the steps to run the simulator. Thanks.
Hi @wisaaco ,
Should I still need to install the related YAFS setting (such like requirements and yafs.yml )before using IDE to run the YAFS?
$ python -m pip install -r requirements.txt
Thanks,
Of course.
Best
El 11 may 2021, a las 18:45, subwayi @.***> escribió:
Hi @wisaaco https://github.com/wisaaco ,
Should I install the related YAFS setting (such like requirements and yafs.yml )before using IDE to run the YAFS?
$ python -m pip install -r requirements.txt
Thanks,
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15#issuecomment-838811028, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZCMQHPTSHJZPOMCOKI7NTTNFNLHANCNFSM4IJDTJUQ.
Hi @wisaaco,
Thanks for the outline. It is helpful! I had do that by step. But I always got the error that said : ModuleNotFoundError: No module named 'yafs' Not only under Ubuntu but also under windows.
I had tried to configure the fold of yafs.core path, but it did not work. Which step should I adjust to solve the error?
Hello, It is a problem with the Python Path of the project
Try to adapt this if you use console to run the project:
export PYTHONPATH=$PYTHONPATH:/
Or if you use Pycharm, then include code folders as a "source folders" (right click in each folder)
Hi @wisaaco
Some of the examples could be worked. Truly appreciate for this!
I would like to execute more of them, and there is the message: ModuleNotFoundError: No module named 'yafs.utils' Is it also the project path setting issue?
Thanks.
It has so many errors apart from this as well, missing dependencies and many other issues! I'm having to manually install matplotlib,tkinter,pathlib etc! Can someone please write it down somewhere!
@apoorvpandey0 follow the installation instructions from the readme... Only two simple steps:
Clone the project in your local folder:
$ git clone --branch YAFS3 https://github.com/acsicuib/YAFS
Create one python virtual environment and install dependencies
(venv)$ python -m pip install -r requirements.txt
Hi All, Could you please advise me, how to install YAFS3 on python version 3.8.8. could you advise me that it won't support above 3.6 but some of my libraries need above 3.7 could you please advise me how to configure
hello sir when i install yafs the following error is coming kindly help
yafs.path_routing module in giving error..
Hi @kiran17819,
You need to consider the YAFS/src folder as a module in your environment. You can do it with VS or in your terminal using the export command:
export PYTHONPATH=$PYTHONPATH:<your_route>/YAFS/src/
and run the main.py file in its folder to avoid more "unconfigurable" paths.
Best, Isaac
El 30 ago 2022, a las 9:27, kiran17819 @.***> escribió:
yafs.path_routing module in giving error..
— Reply to this email directly, view it on GitHub https://github.com/acsicuib/YAFS/issues/15#issuecomment-1231257829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZCMQFOQOFHNIWIUR6WVHLV3WZW7ANCNFSM4IJDTJUQ. You are receiving this because you were mentioned.
Hi I installed yafs for python 2.7. but when I ran the code, there was an error. Traceback (most recent call last): File "C:/Python27/YAFS/src/examples/Tutorial/main1.py", line 12, in
from yafs.core import Sim
File "C:\Python27\lib\site-packages\yafs__init__.py", line 11, in
from yafs.core import Sim
File "C:\Python27\lib\site-packages\yafs\core.py", line 18, in
from yafs.distribution import *
ImportError: No module named distribution
please help me to run your code thanks alot