鱼C论坛

 找回密码
 立即注册
查看: 2114|回复: 1

[已解决]关于MAC安装easygui遇到的问题

[复制链接]
发表于 2017-9-10 15:33:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. 192:easygui-0.96 zhangshu$ sudo python setup.py install
  2. running install
  3. running build
  4. running build_py
  5. running install_lib
  6. copying build/lib/easygui.py -> /Library/Python/2.7/site-packages
  7. byte-compiling /Library/Python/2.7/site-packages/easygui.py to easygui.pyc
  8. running install_egg_info
  9. Writing /Library/Python/2.7/site-packages/easygui-0.96-py2.7.egg-info
  10. 192:easygui-0.96 zhangshu$ easy_install easygui
  11. error: can't create or remove files in install directory

  12. The following error occurred while trying to add or remove files in the
  13. installation directory:

  14.     [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-45845.pth'

  15. The installation directory you specified (via --install-dir, --prefix, or
  16. the distutils default setting) was:

  17.     /Library/Python/2.7/site-packages/

  18. Perhaps your account does not have write access to this directory?  If the
  19. installation directory is a system-owned directory, you may need to sign in
  20. as the administrator or "root" account.  If you do not have administrative
  21. access to this machine, you may wish to choose a different installation
  22. directory, preferably one that is listed in your PYTHONPATH environment
  23. variable.

  24. For information on other options, you may wish to consult the
  25. documentation at:

  26.   https://pythonhosted.org/setuptools/easy_install.html

  27. Please make the appropriate changes for your system and try again.
复制代码



请问这是为什么?之前我用过easy_install安装成功过一次,但是是自动安装在python2.7的目录下,而不是3.4版本。我现在输入import easygui as g还是会报错。请问该如何解决?
最佳答案
2017-9-10 15:41:26
这个问题是因为多版本不兼容。你可以手动将文件脱至3.4目录下(文件需下成对应版本)相应方法见51~52
Mac自带的是2.7左右的版本,你也可以卸载掉,再把默认的设为你的Python版本
不过建议的是下载工具如:pycharm
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2017-9-10 15:41:26 | 显示全部楼层    本楼为最佳答案   
这个问题是因为多版本不兼容。你可以手动将文件脱至3.4目录下(文件需下成对应版本)相应方法见51~52
Mac自带的是2.7左右的版本,你也可以卸载掉,再把默认的设为你的Python版本
不过建议的是下载工具如:pycharm
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-27 13:34

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表