Closed Mouvoh closed 4 years ago
@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 https://github.com/rajeshrinet/pyross/issues/14 and https://github.com/rajeshrinet/pyross/issues/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' I do not know which file to replace now.
@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 :
Traceback (most recent call last):
File "C:\Python38-32\examples\deterministic\SIR.py", line 30, in
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 Thanks you !
Re hello Sir I have a small issue on Binder sometimes it tells me that there is no module named pyross. about installing it on my desktop I saw you asked somebody who had the same problem to change the folder in #3 BUT where should I move the init file ? My error is Traceback (most recent call last): File "C:\Python38-32\pyross-master\pyross-master\pyross\test.py", line 127, in test_run_models deterministic_models = dict(inspect.getmembers(pyross.deterministic, AttributeError: module 'pyross' has no attribute 'deterministic' when I launch the test py
@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, Rajesh
I tried to lauch the setup.py but there is still this small problem about deterministic
... from numpy.polynomial.chebyshev import chebfit, chebval cimport numpy as np cimport cython
pyross\inference.pyx:11:8: 'pyross\deterministic.pxd' not found
Traceback (most recent call last):
File "C:\Users\asus\Desktop\pyross-master\pyross-master\setup.py", line 19, in
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?
It's strange because I do see him. But how do I download it because Ive just downloaded the zip file from here
@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?
git clone https://github.com/rajeshrinet/pyross.git cd pyross make env make
this is what i get
Resolved. I had to install make command. I'm now running the command
It stopped here. Is it over or ?
can you now go to examples folder and try to run the examples?
Traceback (most recent call last):
File "C:\Users\asus\Desktop\pyross\examples\deterministic\ex07-age-structured-SEIR-for-India.py", line 9, in
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):
File "C:\Users\asus\Desktop\pyross\examples\deterministic\ex07-age-structured-SEIR-for-India.py", line 33, in
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 ? But can you please tell me about covid cases data for other countries ?
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 I'm currently installing a virtual machine for use ubuntu. When done the installing process for pyross is it the same with the command invite ?
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
Here is what i get from the notebook
I had installed nlopt even before the make env where i saw its installation I'm despaired now I tried everything
(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
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 import nlopt ModuleNotFoundError: No module named 'nlopt'
Ran 1 test in 0.000s
FAILED (errors=1) make: *** [Makefile:24: test] Error 1
Alternatively, please can you just run
python setup.py install
instead of make?
Thanks
import nlopt
ModuleNotFoundError: No module named 'nlopt'
You need to activate the environment to use the installation:
conda activate pyross
Install instructions have been updated. It seems conda activate <env>
needs to be run outside of the makefile in order to successfully activate the envrionment.
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:
jupyter notebook
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:
conda activate pyross
shoul I activate into the terminal of the folder outside ?
You need to do it for every session before launching Jupyter using jupyter notebook
. It is better to do it from the same folder, but it should not make a difference. Here, a session means when you open a terminal. The session ends when you close the terminal.
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. What do you mean by recovered case and mortality ? You meant the difference between recoverd case and mortality ? Just let me know which column of the https://github.com/rajeshrinet/pyross/files/4599173/owid-covid-data.xlsx it is please
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.
import pyross.contactMatrix
ModuleNotFoundError: No module named 'pyross.contactMatrix'
File "C:\Python38-32\lib\pyross__init__.py", line 1, in
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?