马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
192:easygui-0.96 zhangshu$ sudo python setup.py install
running install
running build
running build_py
running install_lib
copying build/lib/easygui.py -> /Library/Python/2.7/site-packages
byte-compiling /Library/Python/2.7/site-packages/easygui.py to easygui.pyc
running install_egg_info
Writing /Library/Python/2.7/site-packages/easygui-0.96-py2.7.egg-info
192:easygui-0.96 zhangshu$ easy_install easygui
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-45845.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
请问这是为什么?之前我用过easy_install安装成功过一次,但是是自动安装在python2.7的目录下,而不是3.4版本。我现在输入import easygui as g还是会报错。请问该如何解决?
这个问题是因为多版本不兼容。你可以手动将文件脱至3.4目录下(文件需下成对应版本)相应方法见51~52
Mac自带的是2.7左右的版本,你也可以卸载掉,再把默认的设为你的Python版本
不过建议的是下载工具如:pycharm
|