一 python

1.安装python

https://www.python.org/

环境变量path添加 ;C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Scripts

2.安装easy_install

https://pypi.python.org/pypi/ez_setup

解压后tar.gz进入目录 python setup.py install

3.安装pip

https://pypi.python.org/pypi/pip

解压后tar.gz进入目录 python setup.py install

4.whl安装方法 pip install “xxxwhl”

二 windows

1.下载wxpython,通过exe安装

http://wxpython.org/download.php

2.下载matplotlib,通过pip install “xxxwhl”安装  https://pypi.python.org/pypi/matplotlib/

http://matplotlib.org/users/installing.html

For standard Python installations you will also need to install compatible versions of setuptoolsnumpypython-dateutilpytzpyparsing, and cycler in addition to matplotlib.

3.通过pip install pyinstaller安装py2exe

http://pythonhosted.org/PyInstaller/#using-pyinstaller

4.进入py文件目录,pyinstaller xxxpy -F 生成单一exe

三 ubuntu linux

1.import tkFileDialog

>>> import tkFileDialog
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/lib-tk/tkFileDialog.py", line 43, in <module>
    from tkCommonDialog import Dialog
  File "/usr/lib/python2.7/lib-tk/tkCommonDialog.py", line 11, in <module>
    from Tkinter import *
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
    raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package

http://stackoverflow.com/questions/4783810/install-tkinter-for-python

apt-get install python-tk 不是pip install python-tk

2.import wx

http://wxpython.org/download.php

Linux Binaries
To get prebuilt binaries for Linux or other platforms, please search in
your distro's package repository, or any 3rd party repositories that may
be available to you.

Ubuntu users can get information about the the wx APT repositoryhere.

If all else fails you can build wxPython yourself from the source code, see the next section.

http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

(1)curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -

(2)/etc/apt/sources.list

    # wxWidgets/wxPython repository at apt.wxwidgets.org
deb http://apt.wxwidgets.org/ DIST-wx main
deb-src http://apt.wxwidgets.org/ DIST-wx main

(3)sudo apt-get update

(4)sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n

(5)import wx

3. from matplotlib.figure import Figure

http://matplotlib.org/users/installing.html

sudo apt-get install python-matplotlib

4. from bs4 import BeautifulSoup

https://pypi.python.org/pypi/beautifulsoup4

https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html

如果你用的是新版的Debain或ubuntu,那么可以通过系统的软件包管理来安装:

$ apt-get install Python-bs4

Beautiful Soup支持Python标准库中的HTML解析器,还支持一些第三方的解析器,其中一个是 lxml .根据操作系统不同,可以选择下列方法来安装lxml:

$ apt-get install Python-lxml

from docx  import Document

Reading http://pypi.python.org/simple/lxml/
https://pypi.python.org/simple/python-docx/

pip install python-docx 提示需要lxml,安装lxml提示Unable to find vcvarsall.bat

http://zhidao.baidu.com/question/551990477.html

http://www.microsoft.com/express/Downloads/#2008-Visual-CPP去下载visual c++ 2008 express edition 

又提示:

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
cl: 命令行 warning D9025 :正在重写“/W3”(用“/w”)
lxml.etree.c
src\lxml\includes\etree_defs.h(14) : fatal error C1083: 无法打开包括文件:“libxml/xmlversion.h”: No such file or directory
Compile failed: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
xmlXPathInitproty2.c
c:\users\win7\appdata\local\temp\easy_install-4z6i_4\lxml-3.6.4\temp\xmlXPathInitproty2.c(1) : fatal error C1083: 无法打开包括文件:“libxml/xpath.h”: No such file or directory
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: Setup script exited with error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

参考 http://zzq635.blog.163.com/blog/static/19526448620132845436686/ 去http://xmlsoft.org/sources/win32/ 下载相关文件

还是不行,还是直接安装exe?

https://pypi.python.org/pypi/lxml/3.6.0 解决问题。

PIP3 报错 升级pip

Fatal error in launcher: Unable to create process using '"'

C:\Users\win7>python3 -m pip install --upgrade pip

Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.0
    Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-9.0.1
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\win7>pip3 install Pillow
Collecting Pillow
  Downloading Pillow-4.1.1-cp36-cp36m-win_amd64.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 441kB/s
Collecting olefile (from Pillow)
  Downloading olefile-0.44.zip (74kB)
    100% |████████████████████████████████| 81kB 900kB/s
Installing collected packages: olefile, Pillow
  Running setup.py install for olefile ... done
Successfully installed Pillow-4.1.1 olefile-0.44

C:\Users\win7>

 
 

python从零安装的更多相关文章

  1. 第四百零一节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署virtualenv虚拟环境安装,与Python虚拟环境批量安装模块

    第四百零一节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署virtualenv虚拟环境安装,与Python虚拟环境批量安装模块 virtualenv简介 1.安装virtuale ...

  2. 零基础学Python-第一章 :Python介绍和安装-03.Python的安装

    官方版本的python下载以及安装方法,以及pycharm的安装和打开. 社区版就可以完全支持我们的需求了. 点击左侧的图片到右边. 在命令行输入python3 exit() 退出命令行的编辑器. p ...

  3. 知了课堂 Python Flask零基础 笔记整理

    目录 起步 安装Python2.7: Python虚拟环境介绍与安装: pip安装flask: 认识url: URL详解 web服务器和应用服务器以及web应用框架: Flask 第一个flask程序 ...

  4. Python 2/3 安装与运行环境设置

    Python 2/3 安装与运行环境设置: 1.Python 软件源:https://www.python.org/    下载Win版本 https://www.python.org/downloa ...

  5. Python介绍、安装、使用

    Python介绍.安装.使用 搬运工:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Python语言介绍 说到Python语言,就不得不说一下它的创始人Guido van Rossu ...

  6. python开发_mysqldb安装

    在python的API上面,看到了MySQLdb,即python可以操作mysql数据库 接下来,我就把我这两天的工作给大伙絮叨絮叨: 准备条件: 1.MySQL-python-1.2.4b4.win ...

  7. Windows上python开发--2安装django框架

    Windows上python开发--2安装django框架 分类: 服务器后台开发2014-05-17 21:22 2310人阅读 评论(2) 收藏 举报 python django 上一篇文章中讲了 ...

  8. 【Python】如何安装easy_install?

    [Python]如何安装easy_install? http://jingyan.baidu.com/article/b907e627e78fe146e7891c25.html easy_instal ...

  9. Python入门-----Windows安装

    摘要:Python,windows安装 1.进入python的官方网站下载:https://www.python.org 点击Download,选择windows版本:

随机推荐

  1. boost.asio包装类st_asio_wrapper开发教程(2013.12.8更新)(二)

    如果你是偶然浏览到这里,请先看 源代码及例程下载地址:命令行:svn checkout http://st-asio-wrapper.googlecode.com/svn/trunk/ st-asio ...

  2. 题解-hzy loves segment tree I

    Problem 题目概要:给定一棵 \(n\) 个节点的树,点有点权,进行 \(m\) 次路径取\(\max\)的操作,最后统一输出点权 \(n\leq 10^5,m\leq 5\times 10^6 ...

  3. 阿里云服务器ubuntu 配置

    由于阿里云的导入自定义 ubuntu 镜像需要开通 OSS 快照是收费的(看着感觉不贵,但是也很麻烦),而且自己已配置好的镜像想导入需要转换格式,还存在不能使用的情况,所以麻烦点直接在阿里云原来的ub ...

  4. web中绝对路径换虚拟路径

    最近在做一个web项目,将图片上传到服务器后,再访问时拿到的是绝对路劲,而需要的是虚拟路劲.经过一番折腾找到了下列方法可以直接转换. /// <summary>        /// 将W ...

  5. VUE 密码验证与提示

    1. 概述 1.1 说明 vue项目中,为了较为明了的让用户看到所输入的密码信息的长度与复杂度是否满足要求,开发一个组件来满足此需求(当密码输入时进行密码验证操作,当密码的长度在8到24位之间,密码中 ...

  6. cmder 神器 +curl

    cmder 神器 https://www.jianshu.com/p/7a706c0a3411 curl https://www.cnblogs.com/zhuzhenwei918/p/6781314 ...

  7. Unix的哲学

    先讲两个很老的小故事. 第一个故事. 有一家日本最大的化妆品公司,收到了用户的投诉.用户抱怨买来的肥皂盒是空的.这家公司为了防止再发生这样的事故,很辛苦地发明了一台X光检查器,能够透视每一个出货的肥皂 ...

  8. Android性能优化之图片压缩优化

    1 分类Android图片压缩结合多种压缩方式,常用的有尺寸压缩.质量压缩.采样率压缩以及通过JNI调用libjpeg库来进行压缩. 参考此方法:Android-BitherCompress 备注:对 ...

  9. liunx 安装redis 4.0

    liunx 上安装redis 4.0.1 第一步:将 redis-4.0.1.tar.gz 压缩问上传至/home目录下 第二步: 解压文件  tar -zxvf  redis-4.0.1.tar.g ...

  10. vue.js----之router详解(一)

    在vue1.0版本的超链接标签还是原来的a标签,链接地址由v-link属性控制 而vue2.0版本里超链接标签由a标签被替换成了router-link标签,但最终在页面还是会被渲染成a标签的 至于为什 ...