概述
配置环境:python3.4,win10,Visual Studio 2017
使用pip安装jupyter:
命令行命令:pip3 install jupyter
一直完美运行,直到
Collecting pywinpty>=0.5; os_name == "nt" (from terminado>=0.8.1->notebook->jupyter)
Using cached pywinpty-0.5.1.tar.gz
开始报错:
其中一系列错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersHPAppDataLocalTemppip-build-wm0esipmpywinptysetup.py", line 88, in <module>
'Programming Language :: Python :: 3.6'
File "D:Python34libdistutilscore.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "D:Python34libsite-packagessetuptoolsdist.py", line 265, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "D:Python34libsite-packagessetuptoolsdist.py", line 311, in fetch_build_eggs
replace_conflicting=True,
File "D:Python34libsite-packagespkg_resources__init__.py", line 797, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "D:Python34libsite-packagespkg_resources__init__.py", line 1047, in best_match
return self.obtain(req, installer)
File "D:Python34libsite-packagespkg_resources__init__.py", line 1059, in obtain
return installer(requirement)
File "D:Python34libsite-packagessetuptoolsdist.py", line 378, in fetch_build_egg
return cmd.easy_install(req)
File "D:Python34libsite-packagessetuptoolscommandeasy_install.py", line 623, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "D:Python34libsite-packagessetuptoolscommandeasy_install.py", line 653, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "D:Python34libsite-packagessetuptoolscommandeasy_install.py", line 838, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "D:Python34libsite-packagessetuptoolscommandeasy_install.py", line 1066, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "D:Python34libsite-packagessetuptoolscommandeasy_install.py", line 1054, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:UsersHPAppDataLocalTemppip-build-wm0esipmpywinpty
然后百度Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).和Command "python setup.py egg_info" failed with error code 1 in C:UsersHPAppDataLocalTemppip-build-wm0esipmpywinpty这两个我(小白一个)认为的主要错误。
查了一个下午,终于折腾出来了。
第一个错误(关于C++)解决方案:
找到Python34Libdistutils文件夹下的msvc9compiler.py,打开找到def find_vcvarsall(version):这个函数(大概210行左右)
然后把toolskey = "VS%0.f0COMNTOOLS" % version 修改成toolskey = "VS%100COMNTOOLS" % version
(我这用的是Visual Studio 2010 版)
参考博客:
http://blog.csdn.net/u011275279/article/details/73238609
注意相对应得是100或110或120,而不是2010,2012,2013这个版本号我之前改成了2010出现了错误not all arguments converted during string formatting
接下来解决第二个问题:
使用pip3 install --upgrade setuptools更新setuptools
参考博客:
http://blog.csdn.net/ymzj403/article/details/78875555
最后终于完成,使用jupyter notebook命令可使浏览器跳转。
最后
以上就是欣喜日记本为你收集整理的安装jupyter的遭遇的问题的全部内容,希望文章能够帮你解决安装jupyter的遭遇的问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复