美文网首页我爱编程
记安装pyspectator填坑记

记安装pyspectator填坑记

作者: 8416ac9040d9 | 来源:发表于2018-04-15 09:48 被阅读353次

记安装pyspectator填坑记:

Environment INFO:

windows10 + python3.5

1、正常安装官网

# Run as root user:
pip install -U pyspectator_tornado

Error INFO:

Collecting pyspectator_tornado
  Using cached pyspectator_tornado-1.1.2-py3-none-any.whl
Collecting pyspectator>=1.1.2 (from pyspectator_tornado)
  Using cached pyspectator-1.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    error in pyspectator setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; 
    Invalid requirement, parse error at "'-r base.'"

解决办法:

下载源代码;
打开Setup.py相关联的文件, 找到报错的地方: parse error at "'-r base.'":

直接搜索 base, 然后在“.\pyspectator-1.2.1\requirements”找到:

-r base.txt
wmi >= 1.4.9

直接把第一行删除.

运行 python setup.py install
Finished processing dependencies for pyspectator==1.2.1

安装成功

2、再次运行:

# Run as root user:
pip install -U pyspectator_tornado
Requirement already up-to-date: wmi>=1.4.9 in s:\programdata\anaconda3\envs\tensorflow\lib\site-packages\wmi-1.4.9-py3.5.egg (from pyspectator>=1.1.2->pyspectator_tornado)
Installing collected packages: tornado, pyspectator-tornado
Successfully installed pyspectator-tornado-1.1.2 tornado-5.0.

安装成功

3、运行程序:

How to use
To start working with pyspectator_tornado system you must execute file "start.py" in a root directory of project.

Most simple method, where pyspectator_tornado will be binded on port "8888" and available by address: "localhost:8888":

$ python start.py

4、报错 “ImportError: No module named 'psutil”

安装 psutil:

pip install psutil
Collecting psutil
  Downloading psutil-5.4.5-cp35-cp35m-win_amd64.whl (222kB)
    100% |████████████████████████████████| 225kB 7.1kB/s
Installing collected packages: psutil
Successfully installed psutil-5.4.5

安装成功。

5、重复第三步。

报错:

ImportError: No module named 'pyvalid'

安装:

pip install pyvalid

报错:

  Using cached pyvalid-0.9.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\zcaoc\AppData\Local\Temp\pip-build-lpgjhgil\pyvalid\setup.py", line 75, in <module>
        main()
      File "C:\Users\zcaoc\AppData\Local\Temp\pip-build-lpgjhgil\pyvalid\setup.py", line 23, in main
        long_description=open('README.rst').read(),
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 800: illegal multibyte sequence

6、源码安装 pyvalid:

(下载源代码](https://pypi.python.org/pypi/pyvalid/0.9#downloads),打开setup.py,注释以下行:

        #long_description=open('README.rst').read(),
        install_requires=[],
        keywords=[
            'pyvalid', 'valid',
            'validation', 'type',
            'checking', 'check',
            'decorator'
        ],
        platforms='Platform Independent',
        #package_data={
        #    'pyspectator': ['LICENSE', 'README.rst']
        #},

目测,,那个README.rst没什么luan用。所以注释掉没关系;

然后,到目标文件夹运行:

python setup.py install
Installed s:\programdata\anaconda3\envs\tensorflow\lib\site-packages\pyvalid-0.6-py3.5.egg
Processing dependencies for pyvalid==0.6
Finished processing dependencies for pyvalid==0.6

成功安装。

7、重复第三步, 报错:ImportError: No module named 'netifaces'.

pip install netifaces
Collecting netifaces
  Using cached netifaces-0.10.6-cp35-cp35m-win_amd64.whl
Installing collected packages: netifaces
Successfully installed netifaces-0.10.6

成功安装。

8、重复第三步,报错:ImportError: No module named 'win32com'

下载whl文件安装:

Successfully installed pywin32-223

成功安装。

9、重复第三步,成功运行。

成功运行

总结:

1、python包的安装,首先使用pip安装,如果安装失败,好好看看报错信息,, 试着利用setup.py安装。

2、实不相瞒,, 为了安个包,, 我也是惊了。

相关文章

  • 记安装pyspectator填坑记

    原文链接:一只电工的博客 记安装pyspectator填坑记: Environment INFO: windows...

  • UiAutomator2.0升级填坑记

    UiAutomator2.0升级填坑记

  • 填坑记

    后台像前台传值时遇到一个问题: 坑1 使用console.log打印后台传来的json值时只显示[object O...

  • 填坑记

    btng_upload_IDcard id 如果控件不冲突,就是控件所在的layout文件冲突了,多module下...

  • 前端知识填坑记(三):setTimeout,arguments

    前端知识填坑记(二):call和apply,bind ,new setTimeout 以setTimeout来聊聊...

  • activeMQ 填坑记

    前言 MQ是现在大型系统架构中必不可少的一个重要中间件,之前有偏文章《MQ(消息队列)常见的应用场景解析》介绍过M...

  • 填坑记(UI)

    1. tableView刷新闪屏 场景:类似于聊天界面,快速多次发送消息,刷新界面并且滚动到最后一条问题:scro...

  • 填坑记(逻辑)

    1. 在https页面去请求http的资源 问题:https页面内的资源加载不出来,为空白原因:浏览器有安全设置,...

  • webdriverAgent填坑记

    未能载入软件包“WebDriverAgentRunner”,因为它已损坏或丢失必要的资源。 请尝试重新安装软件包。...

  • iView 填坑记

    新的项目UI框架打算用iView,于是还没开工的日子就写一下Demo,于是就遇到坑了 1. icon 打包到生产环...

网友评论

    本文标题:记安装pyspectator填坑记

    本文链接:https://www.haomeiwen.com/subject/prcdkftx.html