2017-06-06 187 views
0

我正嘗試在Windows 10上用Ubuntu將bash安裝在燒瓶上,但它不工作。我安裝了pip,並運行Python 3.5。下面是命令行和異常錯誤的副本。任何幫助將不勝感激!pip在Windows bash上安裝燒瓶bash不能正常工作

[email protected]_PC:~$ cd Project 
bash: cd: Project: No such file or directory 
[email protected]_PC:~$ cd Projects 
[email protected]_PC:~/Projects$ cd py 
[email protected]_PC:~/Projects/py$ cd myflaskapp 
[email protected]_PC:~/Projects/py/myflaskapp$ pip install flask 
Downloading/unpacking flask 
    Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB): 83kB downloaded 
Downloading/unpacking itsdangerous>=0.21 (from flask) 
    Downloading itsdangerous-0.24.tar.gz (46kB): 46kB downloaded 
    Running setup.py (path:/tmp/pip_build_scot/itsdangerous/setup.py) egg_info for package itsdangerous 

    warning: no previously-included files matching '*' found under directory 'docs/_build' 
Downloading/unpacking Werkzeug>=0.7 (from flask) 
    Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB): 312kB downloaded 
Downloading/unpacking Jinja2>=2.4 (from flask) 
    Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB): 340kB downloaded 
Downloading/unpacking click>=2.0 (from flask) 
    Downloading click-6.7-py2.py3-none-any.whl (71kB): 71kB downloaded 
Downloading/unpacking MarkupSafe>=0.23 (from Jinja2>=2.4->flask) 
    Downloading MarkupSafe-1.0.tar.gz 
    Running setup.py (path:/tmp/pip_build_scot/MarkupSafe/setup.py) egg_info for package MarkupSafe 

Installing collected packages: flask, itsdangerous, Werkzeug, Jinja2, click, MarkupSafe 
Cleaning up... 
Exception: 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run 
    requirement_set.install(install_options, global_options, root=options.root_path) 
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install 
    requirement.install(install_options, global_options, *args, **kwargs) 
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install 
    self.move_wheel_files(self.source_dir, root=root) 
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files 
    pycompile=self.pycompile, 
    File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber 
    os.makedirs(destsubdir) 
    File "/usr/lib/python2.7/os.py", line 157, in makedirs 
    mkdir(name, mode) 
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/Flask-0.12.2.dist-info' 

Storing debug log for failure in /home/scot/.pip/pip.log 

update to clarify setup

+0

其實運行python 3.4 !!!對困惑感到抱歉。 –

+0

當你說在Windows上運行bash在ubuntu上時,你是什麼意思?準確的設置是什麼? – Nalaurien

+0

請點擊更新澄清上面的設置,看看我的意思。這個應用程序在windows上的字面意思是叫做bash haha​​。我對Web框架非常陌生,特別是類似Linux的東西,所以我很抱歉我沒有比這更好的答案。 –

回答

0

你能用sudo前綴?所以sudo pip install flask?或者如果你在Windows上可以用管理員權限打開bash提示符?

+0

我認爲這工作!非常感謝你! (在管理員和sudo中運行)。 –

+0

你能否最好的選擇我的答案並結束這個問題?很高興我能幫上忙 :) –