首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在python 3.5.2 windows 10上安装picamera时出错

在python 3.5.2 windows 10上安装picamera时出错
EN

Stack Overflow用户
提问于 2017-11-24 08:20:54
回答 3查看 11.7K关注 0票数 6

我试着用pip 9在windows 10上安装python3.5上的picamera。

另外,我在网上查看并知道我需要安装pyyaml,我确实安装了。这真的很奇怪,有人认为pip需要和setup.py位于同一个位置?更让人困惑的是。总之,下面是我所做的,希望能有所帮助。

执行命令:

代码语言:javascript
复制
pip install --user picamera

命令输出:

代码语言:javascript
复制
Collecting picamera
  Using cached picamera-1.13.tar.gz
Building wheels for collected packages: picamera
  Running setup.py bdist_wheel for picamera: started
  Running setup.py bdist_wheel for picamera: finished with status 'error'
  Complete output from command C:\Users\Dell\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Dell\\AppData\\Local\\Temp\\pycharm-packaging\\picamera\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Dell\AppData\Local\Temp\tmpfj3othpnpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\picamera
  copying picamera\array.py -> build\lib\picamera
  copying picamera\bcm_host.py -> build\lib\picamera
  copying picamera\camera.py -> build\lib\picamera
  copying picamera\color.py -> build\lib\picamera
  copying picamera\display.py -> build\lib\picamera
  copying picamera\encoders.py -> build\lib\picamera
  copying picamera\exc.py -> build\lib\picamera
  copying picamera\frames.py -> build\lib\picamera
  copying picamera\mmal.py -> build\lib\picamera
  copying picamera\mmalobj.py -> build\lib\picamera
  copying picamera\renderers.py -> build\lib\picamera
  copying picamera\streams.py -> build\lib\picamera
  copying picamera\__init__.py -> build\lib\picamera
  running egg_info
  writing picamera.egg-info\PKG-INFO
  writing requirements to picamera.egg-info\requires.txt
  writing dependency_links to picamera.egg-info\dependency_links.txt
  writing top-level names to picamera.egg-info\top_level.txt
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'picamera.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'debian'
  no previously-included directories found matching 'docs'
  writing manifest file 'picamera.egg-info\SOURCES.txt'
  warning: build_py: byte-compiling is disabled, skipping.

  installing to build\bdist.win-amd64\wheel
  running install
  Traceback (most recent call last):
    File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 101, in run
      with io.open('/proc/cpuinfo', 'r') as cpuinfo:
  FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 145, in <module>
      main()
    File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 140, in main
      cmdclass             = {'install': CustomInstallCommand},
    File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\Dell\AppData\Roaming\Python\Python35\site-packages\wheel\bdist_wheel.py", line 240, in run
      self.run_command('install')
    File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 113, in run
      raise ValueError('Unable to open /proc/cpuinfo')
  ValueError: Unable to open /proc/cpuinfo

  ----------------------------------------
  Running setup.py clean for picamera
Failed to build picamera
Installing collected packages: picamera
  Running setup.py install for picamera: started
    Running setup.py install for picamera: finished with status 'error'
    Complete output from command C:\Users\Dell\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Dell\\AppData\\Local\\Temp\\pycharm-packaging\\picamera\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Dell\AppData\Local\Temp\pip-x3ancwkq-record\install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    Traceback (most recent call last):
      File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 101, in run
        with io.open('/proc/cpuinfo', 'r') as cpuinfo:
    FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 145, in <module>
        main()
      File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 140, in main
        cmdclass             = {'install': CustomInstallCommand},
      File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\setup.py", line 113, in run
        raise ValueError('Unable to open /proc/cpuinfo')
    ValueError: Unable to open /proc/cpuinfo

    ----------------------------------------

  Failed building wheel for picamera
Command "C:\Users\Dell\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Dell\\AppData\\Local\\Temp\\pycharm-packaging\\picamera\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Dell\AppData\Local\Temp\pip-x3ancwkq-record\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\Dell\AppData\Local\Temp\pycharm-packaging\picamera\

发生错误:

代码语言:javascript
复制
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'

试着用吡喃安装它,但还是没有运气。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2017-12-04 09:14:51

FileNotFoundError: Errno 2没有这样的文件或目录:'/proc/cpuinfo‘

因为该文件只存在于linux或类unix系统中,而不是在Windows系统或mac中,这就是为什么您无法成功的原因。

票数 6
EN

Stack Overflow用户

发布于 2019-07-08 19:16:54

我在和Kivy和python一起工作的时候遇到了同样的问题。

错误地说“没有找到名为picamera的模块”

帮助我度过难关的解决方案:

代码语言:javascript
复制
pip install opencv-python

是的!它帮了我,也许能为你工作。

编辑:我在Python3.7上尝试过这个(OS : Windows 10)

票数 3
EN

Stack Overflow用户

发布于 2021-06-28 05:50:44

虽然它很古老,但对于遇到同样问题的人来说可能是有用的。步骤。

  1. 打开终端(如果您有一个虚拟env,请激活它)
  2. 类型"set READTHEDOCS=True“
  3. pip安装picamera或4.pip安装picameraarray
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47469053

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档