2015年5月10日 星期日

安裝pip

原本我安裝pip一直遇到問題

我原本參考網路上的文章大多數是使用

$ wget http://python-distribute.org/distribute_setup.py
$ sudo python distribute_setup.py

好的,我的mac沒有裝wget,所以我先找了文章參考怎麼裝wget,如下:


搞定好wget後我就執行 sudo python distribute_setup.py,但是一直出現問題。

  File "distribute_setup.py", line 1
   
    ^
SyntaxError: invalid syntax

上面那幾行我除了知道是語法有問題之外,其他的我根本就不知道是那裡錯。

只好先搞定mac 裡面python版本的問題,我希望事情可以單純一點。

還好上次詢問的專業人仕有寄資料來給我參考。

https://pip.pypa.io/en/latest/installing.html

真的是非常感謝好心的人。

目前我已安裝了pip,也安裝了cython

但是在安裝pip的時候有遇到了點問題

The directory '/Users/sgr918/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/sgr918/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/sgr918/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

不曉得上面是講什麼意思?是路徑要指來指去嗎?

再研究研究。



沒有留言:

張貼留言