在我的Windows 10

时间:2017-01-14 04:40:14

标签: python-2.7 pip install jupyter

我在Windows 10中安装了python 2.7,并设置了HOME,PATH环境变量。

然后键入

  

pip install jupyter

结果如下:

Collecting jupyter
  Using cached jupyter-1.0.0-py2.py3-none-any.whl
Collecting ipykernel (from jupyter)
  Using cached ipykernel-4.5.2-py2.py3-none-any.whl
Collecting jupyter-console (from jupyter)
  Using cached jupyter_console-5.0.0-py2.py3-none-any.whl
Collecting ipywidgets (from jupyter)
  Using cached ipywidgets-5.2.2-py2.py3-none-any.whl
Collecting nbconvert (from jupyter)
  Using cached nbconvert-5.0.0-py2.py3-none-any.whl
Collecting notebook (from jupyter)
  Using cached notebook-4.3.1-py2.py3-none-any.whl
Collecting qtconsole (from jupyter)
  Using cached qtconsole-4.2.1-py2.py3-none-any.whl
Collecting tornado>=4.0 (from ipykernel->jupyter)
  Using cached tornado-4.4.2.tar.gz
Collecting jupyter-client (from ipykernel->jupyter)
  Using cached jupyter_client-4.4.0-py2.py3-none-any.whl
Collecting ipython>=4.0.0 (from ipykernel->jupyter)
  Using cached ipython-5.1.0-py2-none-any.whl
Collecting traitlets>=4.1.0 (from ipykernel->jupyter)
  Using cached traitlets-4.3.1-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter)
  Using cached prompt_toolkit-1.0.9-py2-none-any.whl
Collecting pygments (from jupyter-console->jupyter)
  Using cached Pygments-2.1.3-py2.py3-none-any.whl
Collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter)
  Using cached widgetsnbextension-1.2.6-py2.py3-none-any.whl
Collecting testpath (from nbconvert->jupyter)
  Using cached testpath-0.3-py2.py3-none-any.whl
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter)
  Using cached pandocfilters-1.4.1.tar.gz
Collecting jinja2 (from nbconvert->jupyter)
  Using cached Jinja2-2.9.4-py2.py3-none-any.whl
Collecting jupyter-core (from nbconvert->jupyter)
  Using cached jupyter_core-4.2.1-py2.py3-none-any.whl
Collecting bleach (from nbconvert->jupyter)
  Using cached bleach-1.5.0-py2.py3-none-any.whl
Collecting mistune!=0.6 (from nbconvert->jupyter)
  Using cached mistune-0.7.3-py2.py3-none-any.whl
Collecting nbformat (from nbconvert->jupyter)
  Using cached nbformat-4.2.0-py2.py3-none-any.whl
Collecting entrypoints>=0.2.2 (from nbconvert->jupyter)
  Using cached entrypoints-0.2.2-py2.py3-none-any.whl
Collecting ipython-genutils (from notebook->jupyter)
  Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting singledispatch (from tornado>=4.0->ipykernel->jupyter)
  Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting certifi (from tornado>=4.0->ipykernel->jupyter)
  Using cached certifi-2016.9.26-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado>=4.0->ipykernel->jupyter)
  Using cached backports_abc-0.5-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->ipykernel->jupyter)
  Using cached pyzmq-16.0.2-cp27-cp27m-win32.whl
Collecting win-unicode-console>=0.5; sys_platform == "win32" (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached win_unicode_console-0.5.zip
Collecting pickleshare (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting decorator (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached decorator-4.0.10-py2.py3-none-any.whl
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter)
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached pathlib2-2.2.0-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached simplegeneric-0.8.1.zip
Collecting colorama; sys_platform == "win32" (from ipython>=4.0.0->ipykernel->jupyter)
  Using cached colorama-0.3.7-py2.py3-none-any.whl
Collecting enum34; python_version == "2.7" (from traitlets>=4.1.0->ipykernel->jupyter)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting six (from traitlets>=4.1.0->ipykernel->jupyter)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->nbconvert->jupyter)
  Using cached MarkupSafe-0.23.tar.gz
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach->nbconvert->jupyter)
  Using cached html5lib-0.9999999.tar.gz
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat->nbconvert->jupyter)
  Using cached jsonschema-2.5.1-py2.py3-none-any.whl
Collecting configparser>=3.5; python_version == "2.7" (from entrypoints>=0.2.2->nbconvert->jupyter)
  Using cached configparser-3.5.0.tar.gz
Collecting scandir (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=4.0.0->ipykernel->jupyter)
  Using cached scandir-1.4.zip
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 821, in unpack_url
    hashes=hashes
  File "c:\python27\lib\site-packages\pip\download.py", line 663, in unpack_http_url
    unpack_file(from_path, location, content_type, link)
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 499, in unzip_file
    fp = open(fn, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: 'c:\\users\\wonhee\\appdata\\local\\temp\\pip-build-o9imsa\\scandir\\test/testdir/subdir/unicod\xc6\x8f.txt

我不知道errno 22。 请给我一些解决这个问题的方法。谢谢

3 个答案:

答案 0 :(得分:0)

我认为你的主要问题是'scandir'包。 实际上,我遇到了和你一样的问题,我解决了以下问题。

  • 您需要手动安装'scandir'软件包。
    1. 转到此处:https://pypi.python.org/pypi/scandir
    2. 并下载'scandir-1.4.zip(md5)'并解压缩
    3. 打开cmd,然后转到'scandir-1.4'文件夹
    4. 的目录
    5. 输入'python setup.py install'
    6. 完成安装后,再次尝试安装jupyter

欢呼声。

答案 1 :(得分:0)

就我而言,scandir安装失败了,因为我没有安装python开发工具

sudo apt-get install python-dev 

答案 2 :(得分:0)

要安装没有二进制包的scandir,请使用来自http://www.lfd.uci.edu/~gohlke/

的scandir官方二进制包

然后运行(例如)

pip install scandir‑1.5‑cp27‑cp27m‑win32.whl