我正试图在Windows 10上使用bash在Ubuntu上安装烧瓶,但它无法正常工作。我已经安装了pip,并且正在运行Python 3.5。下面是命令行和异常错误的副本。任何帮助将不胜感激!
scot@SCOTTS_PC:~$ cd Project
bash: cd: Project: No such file or directory
scot@SCOTTS_PC:~$ cd Projects
scot@SCOTTS_PC:~/Projects$ cd py
scot@SCOTTS_PC:~/Projects/py$ cd myflaskapp
scot@SCOTTS_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
答案 0 :(得分:1)
你可以用sudo
作为前缀吗?所以sudo pip install flask
?或者,如果您在Windows上,可以使用管理员权限打开bash提示符吗?