简体   繁体   中英

pip install flask on windows bash not working

I'm trying to pip install flask with bash on Ubuntu on windows 10, but it's not working. I have pip installed, and am running Python 3.5. A copy of the command line and exception error is below. Any help will be greatly appreciated!

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

update to clarify setup

can you prefix with sudo ? so sudo pip install flask ? or if you on windows can you open the bash prompt with admin rights?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM