-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named pyross.ContactMatrix #27
Comments
@Mouvoh thanks for your interest in PyRoss. I suppose that you are trying to install PyRoss in Microsoft Windows. We are aware that the installation causes some issues in this case. Solutions are available in #14 and #3. Hope this helps! Edit: @Mouvoh please make sure that you are not in the same folder as the one which contains the setup.py. Probably just by changing folder will solve your problem Best, Rajesh |
Thanks Sir @rajeshrinet it works now but there is still one error : AttributeError: module 'pyross' has no attribute 'deterministic' |
@Mouvoh, please can you go to the example folder? I want you to run this example and share the screenshot of the first three cells. Thanks |
Okay but let me please tell you that i do not know why but the files are ipynb and unable to open in python so I copy paste the code in new file of the interpreter |
This is what I get as error : |
Did you install it as described in #14. Alternatively, pplease can I suggest to use binder ( Please be patient while it loads but after that, there is no difference in running from your own computer. |
Please also try again with the latest version of PyRoss. |
Thank you ! I will use launch binder it's wonderful ! It works. Can you please tell me which line do I modify in the example If I want to modify for example I0. I saw Is0 = np.array([20]) does it mean there is 20 infected or is it 20% ? |
It means the absolute value, ie the former you said. Is0 = np.array([20]) ## 20 symptomatic infectives |
Alright then N is equal to 10.000 |
|
@Mouvoh I just tried binder on my phone and it works fine. The path to core is not correct in the first cell. I will fix it later today. You do not need to move the init file. Please (a) install all requirements as defined in the project's readme. (b) Then install PyRoss and (c) run examples from the example folder. Let me know if either of (a-c) don't work. There is only one folder from which the code will not work. This is the folder which contains setup.py. Apart from this run the codes from any folder. Moreover you do not need to change the files or their location in core for the example to work. Best, |
I tried to lauch the setup.py but there is still this small problem about deterministic Error compiling Cython file:... import pyross.deterministic
|
It seems you don't have latest version of pyross as the core folder does not contains .pxd file. Please can you pull the latest version? |
@Mouvoh it could be a windows specific problem. I will get back to you on this. For now, please use Binder! |
Please can you try the following using a terminal and see if it works?
|
Resolved. I had to install make command. I'm now running the command |
can you now go to examples folder and try to run the examples? |
Traceback (most recent call last): I GET This |
By the way can i close the command window ? |
Yes, you can close the command window. Also, you do not need to run the first cell (it can be commented). Can you see if you can now import in the second cell? |
Traceback (most recent call last): From there's no module named it is now no attribute lol |
I will need to look into this. Unfortunately, I do not have a windows machine at hand to check it out myself. I will get back to you on this... |
I deal with with launch binder AND WONDERING what if I install a virtual Linux to run pyross ? |
Yes. That is a possibility apart from running Binder. I do not know a systematic way to get covid cases for any country. I do it case-by-case. |
May I know how do you ? And which Linux distribution do you use ? uBUNTU , |
See here: https://github.com/owid/covid-19-data/tree/master/public/data UBUNTU should be fine. |
Since the beginning I open issues hahah I'm glad to purpose a solution about the data now |
From https://github.com/owid/covid-19-data/tree/master/public/data
|
Thanks @Mouvoh. Since the data is very dynamic it will be very useful to use the instructions in your last comment. |
Thanks |
https://github.com/rajeshrinet/pyross#installation Please use either of the two possibilities. Both should work. Please be sure to install all dependencies for the latter. |
(base) kazuki@kazuki:~/pyross$ make env creating conda environment... conda env create --file environment.yml CondaValueError: prefix already exists: /home/kazuki/anaconda3/envs/pyross make: *** [Makefile:18: env] Error 1 (base) kazuki@kazuki:~/pyross$ make Installing pyross... python setup.py install running install running build running build_py running build_ext running install_lib running install_egg_info Removing /home/kazuki/anaconda3/lib/python3.7/site-packages/PyRoss-1.0.0-py3.7.egg-info Writing /home/kazuki/anaconda3/lib/python3.7/site-packages/PyRoss-1.0.0-py3.7.egg-info adding githook... cp .githooks/pre-push .git/hooks/ chmod +x .git/hooks/pre-push (base) kazuki@kazuki:~/pyross$ make test testing pyross... cd ~ && python -m unittest pyross.test E ====================================================================== ERROR: pyross (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: pyross Traceback (most recent call last): File "/home/kazuki/anaconda3/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/home/kazuki/anaconda3/lib/python3.7/site-packages/pyross/__init__.py", line 6, in <module> import pyross.inference File "pyross/inference.pyx", line 14, in init pyross.inference File "/home/kazuki/anaconda3/lib/python3.7/site-packages/pyross/utils_python.py", line 6, in <module> import nlopt ModuleNotFoundError: No module named 'nlopt' ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) make: *** [Makefile:24: test] Error 1 |
Hello Right now I am on linux I followed all the steps I even saw make env install nlopt but it said there is no module named nlopt when i run the test python. As i don't master linux can you tell me what to do please |
Alternatively, please can you just run
Thanks |
You need to activate the environment to use the installation: |
Install instructions have been updated. It seems |
Finally the test returned ok now I amafraid to close lol. What should I do right now please |
Please go to the examples folder and launch Jupyter:
|
THnaks Sir It does work ! ShoulD i ALWAYS run setup.py or just conda activate pyross |
Please activate the environment every time you open the terminal for a new session using:
|
shoul I activate into the terminal of the folder outside ? |
You need to do it for every session before launching Jupyter using |
Please in the The readme of datayou said file for India has four columns: days since the first case, recovered cases and mortality, date, the cumulative number of infected individuals to date. |
In the SIR model: R is removed, that is, the population which is neither susceptible nor infected. Since both recovered and mortality satisfy this criteria, they jointly belong to this class. So you need to subtract both of these from cumulative number of infected to match with Is in the SIR model. Please do the same for your data file. Hope this is helpful. |
Very Helpful Thanks. |
Can you please tell me where did you obtain recovered cases ? |
Hello everybody, I'm novice on github. For my trainee, I have to work on SEAIR model. So I tried to use Pyross, since this morning I struggled to install all the module now when I open Python 3.8.2 Editor and try to import pyross it gives me this.
File "C:\Python38-32\lib\pyross_init_.py", line 1, in
import pyross.contactMatrix
ModuleNotFoundError: No module named 'pyross.contactMatrix'
About the setup.py when I use the install command It gives me :
C:\Python38-32\k>python setup.py install
running install
running build
running build_py
running build_ext
running install_lib
byte-compiling C:\Python38-32\Lib\site-packages\pyross\utils.py to utils.cpython-38.pyc
File "C:\Python38-32\Lib\site-packages\pyross\utils.py", line 2
cimport numpy as np
^
SyntaxError: invalid syntax
running install_egg_info
Removing C:\Python38-32\Lib\site-packages\PyRoss-1.0.0-py3.8.egg-info
Writing C:\Python38-32\Lib\site-packages\PyRoss-1.0.0-py3.8.egg-info
Can you please guide me or if a video is available?
The text was updated successfully, but these errors were encountered: