项目网站:https://github.com/boramalper/himawaripy
OS:Fedora 24(需要可以连接公共网络)
注意,当前仅支持有限的桌面环境,并且,版本敏感:
Unity 7
Mate 1.8.1
Pantheon
LXDE
OS X
GNOME 3
Cinnamon 2.8.8
KDE
升级pip支持:
[root@mhvtl ~]# pip3 install --upgrade pip Collecting pip Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB) 100% |████████████████████████████████| 1.2MB 131kB/s Installing collected packages: pip Found existing installation: pip 8.0.2 Uninstalling pip-8.0.2: Successfully uninstalled pip-8.0.2 Successfully installed pip-8.1.2 [root@mhvtl ~]#
安装pillow支持:
[root@mhvtl ~]# pip3 install pillow Collecting pillow Downloading Pillow-3.3.0-cp35-cp35m-manylinux1_x86_64.whl (5.5MB) 100% |████████████████████████████████| 5.6MB 149kB/s Installing collected packages: pillow Successfully installed pillow-3.3.0 [root@mhvtl ~]#
上传介质:
[root@mhvtl ~]# mkdir /software [root@mhvtl ~]# [root@mhvtl ~]# cd /software [root@mhvtl software]# ls himawaripy-master.zip [root@mhvtl software]#
安装:
1. 通过上传的介质安装:
解压:
unzip himawaripy-master.zip
安装:
[root@mhvtl software]# ls himawaripy-master himawaripy-master.zip [root@mhvtl software]# [root@mhvtl software]# cd himawaripy-master/ [root@mhvtl himawaripy-master]# ls AUTHORS build dist himawaripy himawaripy.egg-info LICENSE osx README.md setup.py systemd [root@mhvtl himawaripy-master]# [root@mhvtl himawaripy-master]# python3 setup.py install running install running bdist_egg running egg_info writing entry points to himawaripy.egg-info/entry_points.txt writing requirements to himawaripy.egg-info/requires.txt writing dependency_links to himawaripy.egg-info/dependency_links.txt writing himawaripy.egg-info/PKG-INFO writing top-level names to himawaripy.egg-info/top_level.txt reading manifest file 'himawaripy.egg-info/SOURCES.txt' writing manifest file 'himawaripy.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/__init__.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/config.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/himawaripy.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/utils.py -> build/bdist.linux-x86_64/egg/himawaripy byte-compiling build/bdist.linux-x86_64/egg/himawaripy/__init__.py to __init__.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/config.py to config.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/himawaripy.py to himawaripy.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/utils.py to utils.cpython-35.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating 'dist/himawaripy-1.1-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing himawaripy-1.1-py3.5.egg Removing /usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg Copying himawaripy-1.1-py3.5.egg to /usr/lib/python3.5/site-packages himawaripy 1.1 is already the active version in easy-install.pth Installing himawaripy script to /usr/bin Installed /usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg Processing dependencies for himawaripy==1.1 Searching for appdirs Reading https://pypi.python.org/simple/appdirs/ Best match: appdirs 1.4.0 Downloading https://pypi.python.org/packages/bd/66/0a7f48a0f3fb1d3a4072bceb5bbd78b1a6de4d801fb7135578e7c7b1f563/appdirs-1.4.0.tar.gz#md5=1d17b4c9694ab84794e228f28dc3275b Processing appdirs-1.4.0.tar.gz Writing /tmp/easy_install-ltsf2fwy/appdirs-1.4.0/setup.cfg Running appdirs-1.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ltsf2fwy/appdirs-1.4.0/egg-dist-tmp-3ibrk_j6 zip_safe flag not set; analyzing archive contents... Moving appdirs-1.4.0-py3.5.egg to /usr/lib/python3.5/site-packages Adding appdirs 1.4.0 to easy-install.pth file Installed /usr/lib/python3.5/site-packages/appdirs-1.4.0-py3.5.egg Searching for tzlocal==1.2.2 Best match: tzlocal 1.2.2 Processing tzlocal-1.2.2-py3.5.egg tzlocal 1.2.2 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/tzlocal-1.2.2-py3.5.egg Searching for pytz==2016.6.1 Best match: pytz 2016.6.1 Processing pytz-2016.6.1-py3.5.egg pytz 2016.6.1 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/pytz-2016.6.1-py3.5.egg Searching for python-dateutil==2.5.3 Best match: python-dateutil 2.5.3 Processing python_dateutil-2.5.3-py3.5.egg python-dateutil 2.5.3 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/python_dateutil-2.5.3-py3.5.egg Searching for Pillow==3.3.0 Best match: Pillow 3.3.0 Adding Pillow 3.3.0 to easy-install.pth file Using /usr/lib64/python3.5/site-packages Searching for six==1.10.0 Best match: six 1.10.0 Adding six 1.10.0 to easy-install.pth file Using /usr/lib/python3.5/site-packages Finished processing dependencies for himawaripy==1.1 [root@mhvtl himawaripy-master]#
安装后检查:
[root@mhvtl himawaripy-master]# pip list | grep --color himawaripy himawaripy (1.1) [root@mhvtl himawaripy-master]# [root@mhvtl himawaripy-master]# find / -name site-packages /usr/lib/python3.5/site-packages /usr/lib64/python3.5/site-packages [root@mhvtl himawaripy-master]# [root@mhvtl himawaripy-master]# ls /usr/lib/python3.5/site-packages/ | grep himawaripy himawaripy-1.1-py3.5.egg [root@mhvtl himawaripy-master]# ls /usr/lib64/python3.5/site-packages/ | grep himawaripy [root@mhvtl himawaripy-master]#
卸载:
[root@mhvtl himawaripy-master]# pip uninstall himawaripy Uninstalling himawaripy-1.1: /usr/bin/himawaripy /usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg Proceed (y/n)? y Successfully uninstalled himawaripy-1.1 Traceback (most recent call last): File "/usr/bin/pip", line 11, in sys.exit(main()) File "/usr/lib/python3.5/site-packages/pip/__init__.py", line 221, in main return command.main(cmd_args) File "/usr/lib/python3.5/site-packages/pip/basecommand.py", line 252, in main pip_version_check(session) File "/usr/lib/python3.5/site-packages/pip/utils/outdated.py", line 102, in pip_version_check installed_version = get_installed_version("pip") File "/usr/lib/python3.5/site-packages/pip/utils/__init__.py", line 848, in get_installed_version working_set = pkg_resources.WorkingSet() File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 619, in __init__ self.add_entry(entry) File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 675, in add_entry for dist in find_distributions(entry, True): File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1942, in find_eggs_in_zip if metadata.has_metadata('PKG-INFO'): File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1463, in has_metadata return self.egg_info and self._has(self._fn(self.egg_info, name)) File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1824, in _has return zip_path in self.zipinfo or zip_path in self._index() File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1704, in zipinfo return self._zip_manifests.load(self.loader.archive) File "/usr/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1644, in load mtime = os.stat(path).st_mtime FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg' [root@mhvtl himawaripy-master]#
卸载后检查:
[root@mhvtl himawaripy-master]# pip list | grep --color himawaripy [root@mhvtl himawaripy-master]#
另一种方式:
python ./setup.py install –record install.txt
cat install.txt | xargs rm -rf
软件介质的获取也可以通过GIT的方式实现。
git获取介质:
[root@mhvtl software]# mkdir git_data [root@mhvtl software]# cd git_data/ [root@mhvtl git_data]# [root@mhvtl git_data]# pwd /software/git_data [root@mhvtl git_data]# ls [root@mhvtl git_data]# [root@mhvtl git_data]# git clone https://github.com/boramalper/himawaripy.git 正克隆到 'himawaripy'... remote: Counting objects: 363, done. remote: Compressing objects: 100% (36/36), done. remote: Total 363 (delta 19), reused 0 (delta 0), pack-reused 327 接收对象中: 100% (363/363), 75.01 KiB | 0 bytes/s, 完成. 处理 delta 中: 100% (176/176), 完成. 检查连接... 完成。 [root@mhvtl git_data]# [root@mhvtl git_data]# ls -ltr 总用量 0 drwxr-xr-x. 6 root root 143 8月 9 08:06 himawaripy [root@mhvtl git_data]# du -sh * 224K himawaripy [root@mhvtl git_data]# [root@mhvtl git_data]# cd himawaripy/ [root@mhvtl himawaripy]# ls AUTHORS himawaripy LICENSE osx README.md setup.py systemd [root@mhvtl himawaripy]#
Python3 setup.py install –record:
[root@mhvtl himawaripy]# python3 setup.py install --record install_himawaripy.log running install running bdist_egg running egg_info creating himawaripy.egg-info writing top-level names to himawaripy.egg-info/top_level.txt writing himawaripy.egg-info/PKG-INFO writing entry points to himawaripy.egg-info/entry_points.txt writing dependency_links to himawaripy.egg-info/dependency_links.txt writing requirements to himawaripy.egg-info/requires.txt writing manifest file 'himawaripy.egg-info/SOURCES.txt' reading manifest file 'himawaripy.egg-info/SOURCES.txt' writing manifest file 'himawaripy.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib creating build/lib/himawaripy copying himawaripy/__init__.py -> build/lib/himawaripy copying himawaripy/config.py -> build/lib/himawaripy copying himawaripy/himawaripy.py -> build/lib/himawaripy copying himawaripy/utils.py -> build/lib/himawaripy creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/__init__.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/config.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/himawaripy.py -> build/bdist.linux-x86_64/egg/himawaripy copying build/lib/himawaripy/utils.py -> build/bdist.linux-x86_64/egg/himawaripy byte-compiling build/bdist.linux-x86_64/egg/himawaripy/__init__.py to __init__.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/config.py to config.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/himawaripy.py to himawaripy.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/himawaripy/utils.py to utils.cpython-35.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying himawaripy.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/himawaripy-1.1-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing himawaripy-1.1-py3.5.egg Copying himawaripy-1.1-py3.5.egg to /usr/lib/python3.5/site-packages Adding himawaripy 1.1 to easy-install.pth file Installing himawaripy script to /usr/bin Installed /usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg Processing dependencies for himawaripy==1.1 Searching for tzlocal==1.2.2 Best match: tzlocal 1.2.2 Processing tzlocal-1.2.2-py3.5.egg tzlocal 1.2.2 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/tzlocal-1.2.2-py3.5.egg Searching for pytz==2016.6.1 Best match: pytz 2016.6.1 Processing pytz-2016.6.1-py3.5.egg pytz 2016.6.1 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/pytz-2016.6.1-py3.5.egg Searching for python-dateutil==2.5.3 Best match: python-dateutil 2.5.3 Processing python_dateutil-2.5.3-py3.5.egg python-dateutil 2.5.3 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/python_dateutil-2.5.3-py3.5.egg Searching for Pillow==3.3.0 Best match: Pillow 3.3.0 Adding Pillow 3.3.0 to easy-install.pth file Using /usr/lib64/python3.5/site-packages Searching for appdirs==1.4.0 Best match: appdirs 1.4.0 Processing appdirs-1.4.0-py3.5.egg appdirs 1.4.0 is already the active version in easy-install.pth Using /usr/lib/python3.5/site-packages/appdirs-1.4.0-py3.5.egg Searching for six==1.10.0 Best match: six 1.10.0 Adding six 1.10.0 to easy-install.pth file Using /usr/lib/python3.5/site-packages Finished processing dependencies for himawaripy==1.1 writing list of installed files to 'install_himawaripy.log' [root@mhvtl himawaripy]# [root@mhvtl himawaripy]# ls -ltr | grep install -rw-r--r--. 1 root root 78 8月 9 08:11 install_himawaripy.log [root@mhvtl himawaripy]# [root@mhvtl himawaripy]# cat install_himawaripy.log | wc -l 2 [root@mhvtl himawaripy]# [root@mhvtl himawaripy]# cat install_himawaripy.log /usr/lib/python3.5/site-packages/himawaripy-1.1-py3.5.egg /usr/bin/himawaripy [root@mhvtl himawaripy]#
运行MATE桌面环境:
[root@localhost himawaripy-master]# env | grep DISPLAY DISPLAY=192.168.232.1:0.0 [root@localhost himawaripy-master]# xhost + access control disabled, clients can connect from any host [root@localhost himawaripy-master]# [root@localhost himawaripy-master]# mate-session (... ... 过多的输出。)
GUI操作:
Shell:
[root@mhVTL himawaripy]# himawaripy Updating... Latest version: 2016/08/09 01:50:00 GMT Offset version: 2016/08/08 23:50:00 GMT Downloading tiles: 16/16 completed Saving to '/root/.cache/himawaripy/latest.png'... Done! [root@mhVTL himawaripy]#
————————
Done。