我尝试使用pip 9在Windows 10上安装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\
发生错误:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'
尝试用pycharm安装它但仍然没有运气
答案 0 :(得分:2)
FileNotFoundError:[Errno 2]没有这样的文件或目录:'/ proc / cpuinfo'
因为该文件只存在于linux或类似unix的系统中,而不存在于Windows系统或mac系统中。这就是为什么你无法成功安装的原因。
答案 1 :(得分:0)
当我使用Kivy和python时遇到了相同的问题
出现一个错误,提示“未找到名为picamera的模块”
帮助我解决问题的解决方案:
pip install opencv-python
是的!它对我有帮助,可能会为您工作。
编辑:我在Python 3.7(OS:Windows 10)上尝试过
答案 2 :(得分:0)
虽然它很旧,但可能对遇到同样问题的人有用。 步骤。