再次和大家強(qiáng)調(diào)一下,如果你想工資有所突破,光靠那些測(cè)試知識(shí)船長(zhǎng)個(gè)人認(rèn)為局限還是比較大的,學(xué)點(diǎn)開發(fā)的知識(shí)對(duì)你的幫助很大。船長(zhǎng)會(huì)堅(jiān)持寫下去,一起學(xué)習(xí)的機(jī)會(huì)只有這么一次,多余的話我就不說了。 現(xiàn)在我們來安裝Flask: Windows系統(tǒng)安裝Flask如果你的系統(tǒng)是Windows,那安裝起來非常方便——pip install flask Mac系統(tǒng)安裝Flask Mac安裝Flask一般為了不影響Python本身的功能會(huì)先下載一個(gè)虛擬環(huán)境,命令如下:
會(huì)看到:
macbookdeMBP-2:~ macbook$ pwd /Users/macbook macbookdeMBP-2:~ macbook$ cd /Users/macbook macbookdeMBP-2:~ macbook$ ls ApplicationsDownloadsMusicPycharmProjects DesktopLibraryPicturesVirtualBox VMs DocumentsMoviesPublicvenv macbookdeMBP-2:~ macbook$ cd venv macbookdeMBP-2:venv macbook$ ls binlib includepip-selfcheck.json macbookdeMBP-2:venv macbook$ cd bin macbookdeMBP-2:bin macbook$ ls activateeasy_install-2.7python-config activate.cshpippython2 activate.fishpip2python2.7 activate_this.pypip2.7wheel easy_installpython macbookdeMBP-2:bin macbook$ source activate 至此,虛擬機(jī)已經(jīng)激活
先回到venv目錄下,然后安裝 (venv) macbookdeMBP-2:bin macbook$ cd .. (venv) macbookdeMBP-2:venv macbook$ cd.. (venv) macbookdeMBP-2:~ macbook$ ls ApplicationsDownloadsMusicPycharmProjects DesktopLibraryPicturesVirtualBox VMs DocumentsMoviesPublicvenv (venv) macbookdeMBP-2:~ macbook$ cd venv (venv) macbookdeMBP-2:venv macbook$ ls binlib includepip-selfcheck.json (venv) macbookdeMBP-2:venv macbook$ pip install flask 安裝后看到:
至此,F(xiàn)lask安裝完畢。 打開你的pycharm,新建項(xiàng)目,可以看到: 點(diǎn)擊Create 就會(huì)生成Flask的模板了: 關(guān)于Mac安裝Flask的方法大家可以看一下這篇帖子,或者自己百度一下: http://blog.csdn.net/idoshi201109/article/details/79079572/ 船長(zhǎng)對(duì)Mac也不熟悉,說實(shí)話我自己安裝的過程也是云里霧里,但是可以安裝成功,具體原因我們不著急解釋,畢竟影響不大,即使你不安裝虛擬環(huán)境直接安裝Flask也沒有太大的影響(個(gè)人觀點(diǎn))。 如果你明白Mac安裝虛擬環(huán)境和Flask的原理,還請(qǐng)不吝賜教! |
|