Can Atom work with Python virtualenvwrapper
Asked Answered
W

4

6

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

Wince answered 18/4, 2016 at 23:33 Comment(0)
G
2

Have you tried the virtualenv package for Atom?

Garnettgarnette answered 1/5, 2016 at 3:34 Comment(5)
I've searched for it in the install link. Could not find it.Wince
Sorry, I didn't realize that the package was so out of date. It looks a bit more involved, but atom.io/packages/python-jedi ought to get the job done.Garnettgarnette
Try to use the new Atom support for virtualenvs: github.com/pghilardi/atom-python-virtualenvRodroda
atom-python-virtualenv only works for *nix systems. Finally, a reason to use Docker!Peursem
@Peursem UPDATE: This package works in UNIX and WINDOWS systems.Unshakable
K
31

In Linux:

  1. Start your virtual environment python.

  2. Launch atom from your python virtual environment.

    (EVP) abc $ atom
    

That's all.

Karleen answered 26/9, 2016 at 4:43 Comment(1)
and on macOS 10.13.1Oread
R
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.

Rodroda answered 25/12, 2016 at 18:14 Comment(0)
G
2

Have you tried the virtualenv package for Atom?

Garnettgarnette answered 1/5, 2016 at 3:34 Comment(5)
I've searched for it in the install link. Could not find it.Wince
Sorry, I didn't realize that the package was so out of date. It looks a bit more involved, but atom.io/packages/python-jedi ought to get the job done.Garnettgarnette
Try to use the new Atom support for virtualenvs: github.com/pghilardi/atom-python-virtualenvRodroda
atom-python-virtualenv only works for *nix systems. Finally, a reason to use Docker!Peursem
@Peursem UPDATE: This package works in UNIX and WINDOWS systems.Unshakable
P
0

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.

enter image description here

Prosperity answered 21/7, 2019 at 8:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.