• Ubuntu系统使用记录


    1. 下载 Ubuntu 16.04
    http://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso

    2. 使用virtual Box进行安装

    3. 系统版本

    4. Python默认版本

    5. git

    在Linux下输入git,如果出现如下提示

    表示没有安装git程序,在Ubuntu下直接使用如下命令安装即可

    sudo apt install git

    6. pip安装

    1)下载

    下载地址:https://pypi.python.org/pypi/pip

    2)解压

    tar zxvf pip-9.0.1.tar.gz

    3)安装

    pip setup.py install出现如下错误

    wxer@wxer:~/Downloads/pip-9.0.1$ python setup.py install
    Traceback (most recent call last):
    File "setup.py", line 6, in <module>
    from setuptools import setup, find_packages
    ImportError: No module named setuptools

    解决方法:先安装setuptools

    下载setuptools,https://pypi.python.org/pypi/setuptools

    解压安装:

    unzip setuptools-34.3.3.zip

    python setup.py install

    又出现如下错误

    Traceback (most recent call last):
    File "setup.py", line 11, in <module>
    import setuptools
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/version.py", line 1, in <module>
    import pkg_resources
    File "/home/wxer/Downloads/setuptools-34.3.3/pkg_resources/__init__.py", line 70, in <module>
    import packaging.version
    ImportError: No module named packaging.version

    以及如下错误:

    Traceback (most recent call last):
    File "setup.py", line 11, in <module>
    import setuptools
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/__init__.py", line 10, in <module>
    from six.moves import filter, map
    ImportError: No module named six.moves

    Traceback (most recent call last):
    File "setup.py", line 11, in <module>
    import setuptools
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/version.py", line 1, in <module>
    import pkg_resources
    File "/home/wxer/Downloads/setuptools-34.3.3/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
    File "/usr/local/lib/python2.7/dist-packages/packaging/requirements.py", line 9, in <module>
    from pyparsing import stringStart, stringEnd, originalTextFor, ParseException
    ImportError: No module named pyparsing

    Traceback (most recent call last):
    File "setup.py", line 11, in <module>
    import setuptools
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
    File "/home/wxer/Downloads/setuptools-34.3.3/setuptools/version.py", line 1, in <module>
    import pkg_resources
    File "/home/wxer/Downloads/setuptools-34.3.3/pkg_resources/__init__.py", line 74, in <module>
    import appdirs
    ImportError: No module named appdirs

    需要安装six,packaging 16.8,pyparsing-2.2.0和appdirs 1.4.3之后,安装再安装setuptools即可。

  • 相关阅读:
    模块
    time/datetime/random/string/os/sys/shutil/zipfile/tarfile
    模块
    模块
    模块
    2.1
    1.4
    生成器 迭代器
    闭包 装饰器
    函数
  • 原文地址:https://www.cnblogs.com/wxer/p/6653880.html
Copyright © 2020-2023  润新知