我想嘗試在Python3中使用Flask。我已經在Ubuntu 14.04上安裝了Python 3.4,據推測它附帶了pip。所以,我想如何使用pip在Python3上安裝Flask?
pip3 install flask
此結束在:
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_kramer65/flask/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-i98xjzea-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_kramer65/flask
Storing debug log for failure in /tmp/tmpqc3b2nu5
所以我試圖將其導入,但無濟於事:
[email protected]:~/cxs$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'flask'
我當然可以下載和安裝使用sudo python3 setup.py install
它這種方式,但我寧願這樣做「標準方式」,以便事情很容易,更加標準的設置在生產機器上。
有誰知道我可以用Python3和pip導入Flask嗎?歡迎所有提示!
錯誤日誌是http://pastebin.com/hd6LyVFP
郵政'/ tmp目錄的/ tmpqc3b2nu5'內容請。 – msvalkon
@msvalkon - 有很多內容,所以我把它粘貼在一個pastebin中:http://pastebin.com/hd6LyVFP有什麼想法? – kramer65