Python Forum
Anaconda Interpretor and Jypiter - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Anaconda Interpretor and Jypiter (/thread-30456.html)



Anaconda Interpretor and Jypiter - AMMras - Oct-21-2020

Hello, world!
Having installed 64-bit Anaconda-3 for Windows, I am trying to import numpy, pandas and matplotlib. The terminal window says that is not considered a outer or inner command. Leaving this question unsolved, I go to Jypiter notebooks and there do import all libraries. thus, the question, can I ignore the fact that the cmd is useless for the libraries and conduct all data science tasks from the notebooks alone? Thank ye.


RE: Anaconda Interpretor and Jypiter - snippsat - Oct-21-2020

You most activate base environment when using it from command line.
Anaconda Prompt dos this automatic.
(Oct-21-2020, 03:54 PM)AMMras Wrote: can I ignore the fact that the cmd is useless for the libraries and conduct all data science tasks from the notebooks alone?
cmd is not the best,i use cmder.
So if i use cmder i activate Anaconda like this:
G:\Anaconda3
λ cd scripts

G:\Anaconda3\Scripts
λ activate

(base) G:\Anaconda3\Scripts
λ cd ..

(base) G:\Anaconda3
λ cd ..

(base) G:\
λ python -V
Python 3.7.3

(base) G:\
λ python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
>>> numpy.__version__
'1.16.2'
>>> exit()
So when see (base) it will always use Anaconda Python version.

Command line is important when programming so using something better that cmd/powershell,as cmder helps.


RE: Anaconda Interpretor and Jypiter - AMMras - Nov-10-2020

Snippsat, thank you so much.
In fact, all libraries are given as active in Enviroments in the Anaconda Navigator.
But, with respect to the Scikit, it is not imported in the Jupiter at all (Numpy, Pandas, Seaborn were not imported in cmd, but they worked in Jupiter).


RE: Anaconda Interpretor and Jypiter - AMMras - Nov-10-2020

part of Scikit does work in my Jupiter.
But another part does not.
If I code
from sklearn.
and then press TAB, there appears a set of methods, and no cross validation amongst them. Cross decomposition does appear.
But there remains the main question: if Jupiter is enough to make codes: so if I never import the libraries properly, and simply write a code with the help of Jupiter (where I see their outputs), it will still be a .py file able to process data?


RE: Anaconda Interpretor and Jypiter - jefsummers - Nov-10-2020

As I recall Jupyter creates files with ipnb extension (iPython Note Book). If the libraries are installed in your base environment you should be able to make .py files for your data analysis using Spyder or VSCode launched from Anaconda.


RE: Anaconda Interpretor and Jypiter - perfringo - Nov-11-2020

(Nov-10-2020, 05:41 PM)AMMras Wrote: But there remains the main question: if Jupiter is enough to make codes: so if I never import the libraries properly, and simply write a code with the help of Jupiter (where I see their outputs), it will still be a .py file able to process data?

To tell the truth I don't fully comprehend the question. But one is clear - Jupyter files are .ipynb and not .py. In order to convert cells or snippets of code in notebook to .py one should use one of the magic commands.

To save cell content into .py file use %%writefile, to write set of lines use %save.

You can also do it in opposite direction i.e. loading from another file into notebook. For that there is %load

You can also run .py file inside notebook with %run


RE: Anaconda Interpretor and Jypiter - mHosseinDS86 - Aug-17-2022

Hi there everyone!
I'm using jupyter notebook to practice python, but when I run and code it doesn't show the output. for example:

Marks = map(int,input("Enter Marks: ").split());

>>>>

it doesn't shown any output. how to fix this problem. Thanks in advance.


RE: Anaconda Interpretor and Jypiter - Larz60+ - Aug-17-2022

add print(Marks) at end