win7 64位下安裝nltk的問題

來源:互聯網
上載者:User
文章目錄
  • Source installation (for 32-bit or 64-bit Windows)

學習需要,要安裝python的一個NLP模組nltk

安裝指南和安裝檔案都在這http://nltk.org/install.html,過程如下

Source installation (for 32-bit or 64-bit Windows)
  1. Install Python: http://www.python.org/download/releases/2.7.3/
  2. Install Numpy (optional): http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  3. Install Setuptools: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
  4. Install Pip: Start>Run... c:\Python27\Scripts\easy_install pip
  5. Install PyYAML and NLTK: Start>Run... c:\Python27\Scripts\pip install pyyaml nltk
  6. Test installation: Start>All Programs>Python27>IDLE, then type import nltk

可是按著一步一步來,可總是出現問題

  安裝1、2沒問題,第三步安裝時,總是提示找不到需要的python版本。

搞了很久,在網上找到了答案,這裡不細說,請看http://www.cnblogs.com/min0208/archive/2012/05/24/2515584.html

我安裝ymin給的方法,完成了第3步,但在第四步時,提示有檔案許可權不夠,原來我把python裝在了C盤,win7萬惡的許可權管理,無奈只好把python刪了,重新再來,我把python裝到了D盤,但執行到3步時,setupTools只找到我之前安裝的目錄,也就是C盤的目錄,我又按ymin的方法跑了一遍,還是不行。。。

  後來自己還是找到了方法:展開註冊表,依次開啟HEKY_CURRENT_USER -> Software -> Python -> pythonCore ->2.7(註:這裡看你裝的是哪個版本,我裝的是2.7),看有沒有PythonPath項,沒有則建立一個PythonPath項,再在PythonPath項中建立位元據,將值設為你的python安裝目錄(如我的:D:\Program Files (x86)\python2.7;C:\Program Files (x86)\python2.7\Lib\;D:\Program Files (x86)\python2.7\DLLs\)完成後,重新執行第3步驟即可安裝成功。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.