小白入門:用什麼寫Python?
對於新手而言,學了大概的語法,七七八八的歷史、概念、知識,然而最直接的一個問題卻無人解答:到底要用什麼軟體、什麼環境來寫python?比如.m檔案可以用matlab寫,java可以用Eclipse寫,C語言可以用VC等軟體寫。那麼Python用什麼寫呢?
和C語言一樣,當然你可以直接在電腦上開個黑框寫,也可像html一樣用記事本寫,但是沒有視覺化、便利化的編譯軟體,顯然不符合當代程式設計師的個性嘛。所以這裡推薦下比較流行的一款:Anaconda。
最早也是其他童鞋推薦的,後來看書,例如《Deep Learning With Python》裡面,指定用的編譯軟體就是Anaconda。
Anaconda有許多優勢:
Anaconda Navigator is a desktop graphical user interface (GUI) included in Anaconda® distribution that allows you to launch applications and easily manage conda packages, environments and channels without using command-line commands. Navigator can search for packages on Anaconda Cloud or in a local Anaconda Repository. It is available for Windows, macOS and Linux.
下載連結:https://www.anaconda.com/download/#macos
開啟後介面:(我是用macOS系統的)
然後你Launch那個Spyder就可以寫python啦!
Spyder is the Scientific PYthon Development EnviRonment:
- a powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features
- and a numerical computing environment thanks to the support of IPython
Spyder may also be used as a library providing powerful console-related widgets for your PyQt-based applications – for example, it may be used to integrate a debugging console directly in the layout of your graphical user interface.
下面我們來示範一下:
就是這麼簡單,然後就可以在這裡寫啦。
當然,作為新時代的碼農,程式碼主要是靠copy啦,copy進來跑就好了嘛。
之後要跑什麼高階點的程式,再自己慢慢探索吧!
開始在python的海洋裡遨遊吧!!!~