Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在python 3.5.2 windows 10上安装picamera时出错_Python - Fatal编程技术网

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

在python 3.5.2 windows 10上安装picamera时出错,python,Python,我试图在Windows10上用PIP9将picamera安装到我的python 3.5中 另外,我在网上查了一下,知道我需要安装pyyaml,我确实安装了。这真的很奇怪,有人建议pip必须与setup.py位于同一位置?这更令人困惑。不管怎样,下面是我所做的,希望对你有所帮助 执行命令: pip install --user picamera 命令输出: Collecting picamera Using cached picamera-1.13.tar.gz Building wheel

我试图在Windows10上用PIP9将picamera安装到我的python 3.5中

另外,我在网上查了一下,知道我需要安装pyyaml,我确实安装了。这真的很奇怪,有人建议pip必须与setup.py位于同一位置?这更令人困惑。不管怎样,下面是我所做的,希望对你有所帮助

执行命令:

pip install --user picamera
命令输出:

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\

试图用pycharm安装它,但仍然没有成功

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


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

我在使用Kivy和python时遇到了相同的问题

“未找到名为picamera的模块”时出错

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

pip install opencv-python
是的。!它帮助了我,可能对你有用


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

我在python2.7中也遇到了同样的问题,结果是它在Linux上工作得很好。这在fac中有明确提到,那么这是否意味着无法在Windows上安装picamera库?为什么可以安装其他python库,但不能安装picamera?我只是想让IDE中关于无法导入picamera的错误消失……它似乎只适用于linux,目前在2021年也有同样的问题。@vijayky88你错了。当前文档以及上的存档文档中没有提到此问题。如果您将注释作为答案发布,并成功地将其损坏,则看起来像是答案。。。。然后完成最后一英里,包括您尝试过的操作系统和python版本。现在你的回答并没有回答OP的问题,这是与操作系统相关的。先生,但我在python 3.7和windows 10上使用了这个命令,只是我无法安装picamera,但当我执行此步骤时,它没有给我带来问题。这并不能解决问题,也无助于解决问题。
pip install opencv-python