Firstly, I installed cobra globally, but because I want to use carvme based on cplex, I created a new environment for consolidating python3.6. When I try to import cobra using jupyter notebook in a new environment, it shows an error
"ModuleNotFoundError: No module named 'cobra'"
. But it can be successfully imported in my linux python.
This means that in the new environment, cobra can be imported in the terminal but not in jupyter. I spent some time trying to find the possible reasons. When I used "import sys; sys.path", the terminal and jupyter notebook gave different results.
I find the different is there is home/zhiyan/anaconda3/envs/python36env/lib/python3.6/site-packages in linux python but no in jupyter notebook.
I am not sure if this is the reason, because I don't know how to go to jupyter Add PATH.
Thanks a lot.