Closed thirumalaipm closed 2 years ago
Hello Kelvin,Many thanks, I don really know how to play around, I wish I could get direct command line to execute to clear the error. I am a novice to python and Jupiter notebook as well. Many thanks, On Monday, July 27, 2020, 03:56:32 PM GMT+1, Kevin Bates notifications@github.com wrote:
As noted multiple times above, given things work in python directly and not from a kernel launched from the notebook server, this is most likely a difference in envs between the two python executables. Locate the kernel.json file (using jupyter kernelspec list) of the kernel you're launching and ensure the python used in the argv stanza is the same as the python used from the command line.
Please check your version of syft in each environment. If older than 0.2.1.a1 then the import should be from syft.frameworks.torch.federated. If its a more recent version, then there might be an issue with the underlying torch installation - I don't know.
Also note that pip install syft reverts both tornado (back to 4.5.3) and notebook (back to 5.7.8) installations - so beware!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Ping me via email (located on my GH profile) and perhaps we can try an online meeting to get you going - no promises though.
ModuleNotFoundError Traceback (most recent call last)
given things work in python directly and not from a kernel launched from the notebook server, this is most likely a difference in envs between the two python executables. Locate the kernel.json file (using jupyter kernelspec list) of the kernel you're launching and ensure the python used in the argv stanza is the same as the python used from the command line.
Not sure what package provides the notebooks
module, but this all implies that that package is not installed in the "environment" in which your kernel is running.
ImportError Traceback (most recent call last)
Please see this comment from above. The code that is running this import statement is running from an environment that is likely different than the python in which notebook server is running (assuming that import works fine from the command line). My guess is that pymatsolver should be updated in your base user env.
Problem : Import on Jupyter notebook failed where command prompt works. Reason : This problem usually occurs when your cmd prompt is using different python and Anaconda/jupyter is using different. Solution : Follow the following steps :-
Run this code in cmd prompt and jupyter notebook and note the output paths. It will probably be different.
import sys
sys.executable
Run this cmd in jupyter notebook.
!jupyter kernelspec list
--> Go to that directory and open kernel.json file.
--> Change the 1st parameter of "argv" ,where 'python'(or python directory) is written with the exact output path of the 1st step, which was executed in cmd prompt. Save the changes.
Note : Problem might be resolved by now . Try importing same library in jupyter notebook again by restarting the kernel, if the kernel does not start then perform the 3rd step.
python -m pip install ipykernel
python -m ipykernel install
If you're looking for a fix for VS Code
you may want to look here.
I can't install geopandas in my work device due to restrictions. It's one of the reasons I started using jupyter notebook which seemed to work fine, for a while even without installing geopandas, but now it throws the "ModuleImportError" for geopandas, all of a sudden. I haven't changed anything (like version etc). What could be the issue?
Any help would be much appreciated.
no moduel named Image It was working just fine then I tried to implement my code in a function and there is an error, I am done, I wasted 5 hours making a simple Program with Python and R
Hi @Saad-py - could you please provide the context (e.g., the cell code being invoked) and traceback information in which you see no moduel named Image
? This sounds like either an env conflict (like those above) or a conflict between built-in and user-defined modules.
Hi,
I am new to Python and Anaconda. I installed anaconda and install Scipy. When I try import scipy in the Python in command prompt on the Anaconda prompt, it works fine as below
[Anaconda3] C:\Users\me>python Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>>
But when I use the same in the Jupyter notebook, I am getting -
ImportError Traceback (most recent call last) <ipython-input-3-4dc45f4c0083> in <module>() ----> 1 import scipy ImportError: No module named 'scipy'
Please let me know how to solve this issue.
This might work for you.
Hey there, I'm going through old issues and it seems to me that it makes sense to close this one.
Thanks everyone and happy hacking! :bowtie:
Hi,
I am new to Python and Anaconda. I installed anaconda and install Scipy. When I try import scipy in the Python in command prompt on the Anaconda prompt, it works fine as below
But when I use the same in the Jupyter notebook, I am getting -
Please let me know how to solve this issue.