V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
goofansu
V2EX  ›  Python

趁打折入手了coderunner,在使用python时遇到问题,我是用virtualenv的,应该怎么配置才能让它使用我的env?有同学遇到过这个问题吗?网上搜了下没什么结果

  •  
  •   goofansu · 2012-06-06 22:44:42 +08:00 · 3248 次点击
    这是一个创建于 4373 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    1970-01-01 08:00:00 +08:00
    yoyicue
        1
    yoyicue  
       2012-06-09 00:37:35 +08:00   ❤️ 1
    首先要了解一个事情
    使用 virtualenv 的 env/bin 目录中的 python 就不用 source 命令了

    下文中使用 /User/Yourname/venv/bin/python 来讲解
    (~/venv/bin/python)

    打开 CodeRunner 之后打开 Preferences
    翻到 Languages 选项卡
    然后新添加一门 Language 例如 Venv
    然后在右面 Run Command 输入
    /Users/YourName/venv/bin/python $filename

    附加做两个无关紧要的事情
    Syntax Mode 选择 Pyhton
    File Extension 填写 py

    重新打开软件后你就看见默认的语言是 Venv 了
    这样你再打开运行的文件 就是跑在上面所说的 virtualenv 里了

    goofansu
        2
    goofansu  
    OP
       2012-06-09 01:06:51 +08:00
    @yoyicue 原来是这样,多谢多谢,问题解决,这个软件真不错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2919 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:33 · PVG 21:33 · LAX 06:33 · JFK 09:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.