问个在OS X中使用PyCharm的问题。

2013-01-01 22:48:59 +08:00
 jerichowon
当PyCharm在OS X安装成功以后,初次设置interpreter时,有一个创建virtual environment的选项,可以我在创建virtual environment时总是提示创建失败。

请问这是为什么?有人碰到过么?

OS X 版本为10.8
PyCharm版本为2.6
7573 次点击
所在节点    MacBook Air
8 条回复
chlx
2013-01-01 23:11:19 +08:00
版本一致,没有遇到这个问题.LZ说详细点?
jerichowon
2013-01-02 12:49:34 +08:00
@chlx 这个是我的错误信息:

The following command was executed:

virtualenv.py --never-download --distribute /Users/admin/untitled1

The error output of the command:

Traceback (most recent call last):
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 2429, in <module>
main()
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 942, in main
never_download=options.never_download)
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 1049, in create_environment
search_dirs=search_dirs, never_download=never_download)
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 603, in install_distribute
search_dirs=search_dirs, never_download=never_download)
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 570, in _install_req
cwd=cwd)
File "/Applications/PyCharm.app/helpers/virtualenv.py", line 1020, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/admin/untitled1/bin/python -c "#!python
\"\"\"Bootstra... main(sys.argv[1:])
" --always-copy -U distribute failed with error code 1

New python executable in /Users/admin/untitled1/bin/python
Installing distribute........
Complete output from command /Users/admin/untitled1/bin/python -c "#!python
\"\"\"Bootstra... main(sys.argv[1:])
" --always-copy -U distribute:
Traceback (most recent call last):
File "<string>", line 23, in <module>
File "/Users/admin/untitled1/lib/python2.7/distutils/__init__.py", line 16, in <module>
exec(open(os.path.join(distutils_path, '__init__.py')).read())
IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/__init__.py'
----------------------------------------
...Installing distribute...done.
jerichowon
2013-01-02 12:54:05 +08:00
接图再这里:
davidx
2013-01-06 15:31:25 +08:00
从目前能看到的信息上看, 貌似是少一个__init__.py
hussion
2013-01-06 15:44:55 +08:00
没有碰到...
jerichowon
2013-01-06 21:30:10 +08:00
不是吧,这种事情只有我碰到?
ry_wang
2013-02-16 11:44:20 +08:00
@jerichowon 没装xcode的command tools吧.
lowrain
2013-08-10 12:45:05 +08:00
@jerichowon 没装xcode的command tools吧. +1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/56377

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX