简体   繁体   English

Raspberry Pi Python错误

[英]Raspberry Pi Python Error

I tried to install distribute or setuptools which has to be done prior to installing pip on the Raspberry Pi. 我尝试安装分发或安装工具,这必须在Raspberry Pi上安装pip之前完成。

The command used was $ curl http://python-distribute.org/distribute_setup.py | python 使用的命令是$ curl http://python-distribute.org/distribute_setup.py | python $ curl http://python-distribute.org/distribute_setup.py | python

However I got the following error. 但是我收到以下错误。 I can copy past the entire terminal script if requested. 如果需要,我可以复制整个终端脚本。

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-2082.pth'

Thanks for helping! 谢谢你的帮助!

I have never using raspberry pi. 我从未使用过覆盆子pi。 But from the log can be seen it complain about cannot have permission to modify python package directory. 但是从日志中可以看出它抱怨无法修改python包目录的权限。 You have to run pip install using root privilege. 您必须使用root权限运行pip install。

This answer is based on what ever operating system you have but one that is specifically Linux based like raspbian you should open up terminal and type in chmod +x file path here . 这个答案基于你所拥有的操作系​​统,但是特别是基于Linux的Solaris系统你应该打开终端并输入chmod + x 文件路径 Also for this to work you should be inside where ever the file is stored when you run chmod +x etc... /Desktop/python/ for example would work. 此外,当你运行chmod + x等时,你应该在文件存储的内部... /例如/ Desktop / python /可以工作。

try 尝试

sudo curl http://python-distribute.org/distribute_setup.py | python command

some permisssions problem are resolved like this. 一些permisssions问题就这样解决了。 I'm not sure if this works. 我不确定这是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM