Closed susanGhaderi closed 4 years ago
Hi @susanGhaderi this can happen if you import in a python environment in which you did not install this in, try installing other packages maybe to figure out whether this also happens for them? Best, David
Hi @davidsebfischer, Indeed, I can import other packages, for example I can import tensorflow as tf. But to be more clear, after installing tf-nightly, tfp-nightly, tensorflow and tensorflow_probability. In the directory /Users/susanghaderi/ I use $git clone https://github.com/theislab/batchglm.git then I use
$cd batchglm
and then
$pip install -e . $cd .. $git clone https://github.com/theislab/diffxpy.git $cd diffxpy $pip3 install -e .
But when in python, I run import diffxpy.api as de I get the error.
If you think I am mistaken in this procedure, I would be thankful if you kindly let me know.
Could you tell me how you installed tensorflow? ie the exact shell statement.
This is the exact command $pip3 install tensorflow
did you restart the notebook or the python session after this? this might be necessary. as long as this pip3 points to the same environment this shouldnt happen and is an environemnt issue rather than a diffxpy issue. how about you do
which python3
which pip3
and then check that you attempt the import from the python3 that shows in the shell. you are likely calling a different environment that just also has tensorflow installed in which you get the diffxpy import error.
Thank you @davidsebfischer, indeed the problem was with pip3. Therefore, first I update pip by pip install -U spyder then I install both batchglm and diffxpy, then I try them by pip but I get this error
ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. Then I solve this issue by getting help from #841. Then again I install them and now they are working.
I add this description for reference.
Thank you for your help.
I try to import diffxpy.api as de, but I get this error
ModuleNotFoundError: No module named 'diffxpy.api',
I install diffxpy by following the orders here https://diffxpy.readthedocs.io/en/latest/installation.html Any help is appreciated.