Can Atom work with Python virtualenvwrapper

馋奶兔 提交于 2019-12-21 12:32:04

问题


I want to start a Flask app. I installed virtualenvwrapper to manage the packages but I can't let Atom know that the current project should use the virtualenv's python binary.

from flask import Flask, render_template

Using Atom's script runner, I get an "ImportError: No module named flask".

I don't want the hassle of having to change to a terminal to run the app


回答1:


Have you tried the virtualenv package for Atom?




回答2:


In Linux:

  1. Start your virtual environment python.

  2. Launch atom from your python virtual environment.

    (EVP) abc $ atom
    

That's all.




回答3:


I am the creator of a new package that adds support to virtualenv inside Atom: Atom Python Virtualenv

You can select a virtualenv, create a new one or deactivate, all of this inside Atom.

Feel free to contribute to the project on github.




回答4:


I played around with linter-pylint 2.1.1 package installed in Atom 1.38.2 x64 and work a lot in virtual environments (using conda activate). I got Pylint and Atom to play nice (so far!) with the following settings. You need to check the "Disable Execution Timeout", otherwise it likely will timeout.



来源:https://stackoverflow.com/questions/36706039/can-atom-work-with-python-virtualenvwrapper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!