Code Monkey home page Code Monkey logo

virtualenv's People

Contributors

dingus9 avatar jhutchins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

virtualenv's Issues

how to select virtualenv in root?

Says it can be done but I can't see how.

I have my source dir and in that source dir I have a venv directory. How do I get it to use that?

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:53:11)
<unknown> (/Users/igorkuznetsov/.atom/packages/virtualenv/lib/init.coffee:28:11)

Command not found.

I am not sure if this is something that i am doing wrong.
On my Mac:
which virtualenv
/usr/local/bin/virtualenv

When i go to ATOM and try to make a virtual env:
Uncaught Error: Command failed: /bin/sh -c virtualenv test
/bin/sh: virtualenv: command not found

And also is there anyway that i could activate existing the virtual env ?

Feature request - play nicely with other plugins

It appears that autocomplete-plus-python-jedi runs jedi-cmd.py at the time a new window is created and it persists (with whatever environment it got at that point) until that window is closed, whereas the virtualenv Atom package allows for later context switching at the window level. This context switch is completely missed by autocomplete-plus-python-jedi.

It would be nice if there was some mechanism by which autocomplete-plus-python-jedi could restart the jedi-cmd.py under the new environment when it detects one. This may require coordination between the two projects. I have filed a sister issue (tinloaf/autocomplete-plus-python-jedi#12) to track this.

Deprecated Atom APIs will be removed June 1st

Atom will no longer load this package after June 1st without changes. There are a couple deprecations on the latest version (0.6.2) of this package:

  1. Requiring $ from atom is no longer supported. If you are using space-pen, please require $ from atom-space-pen-views. Otherwise require jquery instead: {$} = require 'atom-space-pen-views' or $ = require 'jquery' Add "atom-space-pen-views": "^2.0.3" to your package dependencies. Or add "jquery": "^2" to your package dependencies.
  2. Requiring SelectListView from atom is no longer supported. Please require SelectListView from atom-space-pen-view instead: {SelectListView} = require 'atom-space-pen-views' Note that the API has changed slightly! Please read the docs at https://github.com/atom/atom-space-pen-views Add "atom-space-pen-views": "^2.0.3" to your package dependencies.
  3. Requiring EditorView from atom is no longer supported. Please require TextEditorView from atom-space-pen-view instead: {TextEditorView} = require 'atom-space-pen-views' Add "atom-space-pen-views": "^2.0.3" to your package dependencies.
  4. Requiring View from atom is no longer supported. Please require atom-space-pen-views instead: {View} = require 'atom-space-pen-views' Add "atom-space-pen-views": "^2.0.3" to your package dependencies.
  5. atom.workspaceView is no longer available. In most cases you will not need the view. See the Workspace docs for alternatives: https://atom.io/docs/api/latest/Workspace. If you do need the view, please use atom.views.getView(atom.workspace), which returns an HTMLElement.
  6. Use ::addLeftTile({item, priority}) instead.
  7. The atom.workspaceView.statusBar global is deprecated. The global was previously being assigned by the status-bar package, but Atom packages should never assign globals. In the future, this problem will be solved by an inter-package communication API available on atom.services. For now, you can get a reference to the status-bar element via document.querySelector('status-bar').
  8. Use Workspace::observeTextEditors instead
  9. Use Workspace::getTextEditors instead
  10. Use Workspace::onDidAddTextEditor or Workspace::observeTextEditors instead.
  11. Use TextEditor::onDidChangeGrammar instead
  12. Use PackageManager::onDidActivateInitialPackages instead
  13. Call ::getActiveTextEditor instead
  14. Use TextBuffer::onDidChange instead
  15. Use TextEditor::scrollToCursorPosition instead. You can get the editor via editorView.getModel()

Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see up-to-date deprecations.

If this package has been replaced by another package or functionality in core, please reply with this information.

See atom/atom#6867 for more info. Thanks!

`Packages` -> `Virtualenv` -> [virtualenv_name] doesn't have any apparent effect?

I can change virtualenvs successfully from the status bar, but choosing Packages -> Virtualenv -> [virtualenv_name] doesn't seem to have any effect. I'm on OS X 10.9.5:

Darwin ... 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64

How to reproduce:

  1. Start Atom
  2. Create a new file (e.g., foo.py)
  3. Note <None> appears for the virtualenv in the status bar
  4. From the application menu, choose Packages -> Virtualenv -> [virtualenv_name]

<None> continues to appear in the status bar. Further if a package like autocomplete-plus-python-jedi (or linter-pyflakes, linter-pylint, etc.) is installed, it will not look for Jedi in the virtualenv (but rather whatever environment was configured at the time Atom was started).

Compare to:

  1. Start Atom
  2. Create new file (e.g., foo.py)
  3. Click on <None> in the status bar and select [virtualenv_name]

Now the status bar is updated to [virtualenv_name], and autocomplete-plus-python-jedi will find Jedi in the virtualenv.

Uncaught Error: Command failed: /bin/sh -c find . -maxdepth 3 -name activate

I'm getting the following error when installing virtualenv on Atom:

Uncaught Error: Command failed: /bin/sh -c find . -maxdepth 3 -name activate
find: ./.DocumentRevisions-V100: Permission denied
find: ./.fseventsd: Permission denied
find: ./.Spotlight-V100: Permission denied
find: ./.Trashes: Permission denied

unable to see text when creating a new env and cannot create one at enter

[Enter steps to reproduce below:]

  1. install atom
  2. install virtualenv package using atom provided tool
  3. make new env

notes:
I can't see the texts i type when trying to create a new env, after i press enter anyways, it pops the bug reporting window

Atom Version: 0.186.0
System: Mac OS X 10.10.2
Thrown From: Atom Core

Stack Trace

Uncaught Error: Command failed: /bin/sh -c virtualenv testing
/bin/sh: virtualenv: command not found

At events.js:94

Error: Command failed: /bin/sh -c virtualenv testing
/bin/sh: virtualenv: command not found

  at ChildProcess.exithandler (child_process.js:749:12)
  at ChildProcess.emit (events.js:119:17)
  at maybeClose (child_process.js:1013:16)
  at Socket.<anonymous> (child_process.js:1181:11)
  at Socket.emit (events.js:116:17)
  at Pipe.close (net.js:477:12)

Commands

     -1:22.8 virtualenv:make (atom-text-editor.editor)
     -1:15.7 core:confirm (atom-text-editor.editor.mini)
     -0:37.8 virtualenv:deactivate (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
     -0:10.7 virtualenv:make (div.settings-view.pane-item)
  9x -0:04.7 core:backspace (atom-text-editor.editor.mini)
     -0:00.6 core:confirm (atom-text-editor.editor.mini)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "editor": {
    "invisibles": {}
  }
}

Installed Packages

# User
virtualenv, v0.6.2

# Dev
No dev packages

Make virtualenvwrapper envs location configurable in plugin

I do not use default .virtualenvs directory in home for my Virtualenvwrapper. I have a custom location set for this. Can you please make this thing configurable in plugin settings. So that the default can be /home/user/.virtualenvs/ but can be changed.

For now, I have symlinked my envs location to .virtualenvs

Use the project "atom-python-virtualenv" to use virtualenv with Atom

Hi everyone,

As this project is no longer being maintained, I have created the project atom-python-virtualenv that adds support to virtualenv in Atom ๐Ÿ˜„

The new project is based in jhutchins code, but I had some work to use the updated Atom API and bring back to life some features that aren't working anymore. I am planning to add new features and improve the virtualenv support within Atom.

Link to atom package: https://atom.io/packages/atom-python-virtualenv
Link to repository: https://github.com/pghilardi/atom-python-virtualenv

Better Support for Virtualenv Directories (.env or any arbitrary path)

I got your plugin to work by symlinking my virtualenv into my project's directory root folder, naming it "env". I cannot get it to use:

  1. ".env"
  2. any other absolute or relative directory path outside of my project's root directory

It would be ideal to provide better support for virtualenv paths.

selecting virtualenv from menu doesn't work, keybinding does

I can activate a virtualenv using the ctrl-alt-v keybinding, but selecting one from the Atom menu bar does not activate that virtualenv. Perhaps that was never the intent, and it is merely listing the available virtualenvs, though it would be nice to activate them from the menu directly.

[This is not an issue] How exactly does this create the virtual environment

I typically use atom as my IDE, but I've recently been experimenting vs code, and to create to a virtual env in vs code, you run the command py -3 -m venv .venv which can be substituted with python -m venv .venv or virtualenv .env. I know this is the main way of creating a virtual env, but I've heard that there are other ways that run slightly differently. How does this plugin create your virtual env when you click make in the dropdown menu. I also use python 3.7 still, as certain packages I use still haven't updated. Oh, and just to clarify, this is NOT an issue.

Failed to load the virtualenv package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.189.0
System: Microsoft Windows 7 Professional
Thrown From: virtualenv package, v0.6.2

Stack Trace

Failed to load the virtualenv package

At Arguments to path.join must be strings

TypeError: Arguments to path.join must be strings
  at f (path.js:178:13)
  at Object.filter (native)
  at Object.win32.join (path.js:183:38)
  at new VirtualenvManager (C:\Users\sayth\.atom\packages\virtualenv\lib\virtualenv-manager.coffee:22:24)
  at Object.<anonymous> (C:\Users\sayth\.atom\packages\virtualenv\lib\init.coffee:7:16)
  at Object.<anonymous> (C:\Users\sayth\.atom\packages\virtualenv\lib\init.coffee:1:1)
  at Module._compile (module.js:452:26)
  at Object.requireCoffeeScript (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\node_modules\coffee-cash\lib\coffee-cash.js:85:19)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Package.module.exports.Package.requireMainModule (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:678:34)
  at C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:189:28
  at Package.module.exports.Package.measure (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:167:15)
  at Package.module.exports.Package.load (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:181:12)
  at PackageManager.module.exports.PackageManager.loadPackage (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package-manager.js:383:14)
  at PackageManager.module.exports.PackageManager.loadPackages (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\package-manager.js:355:14)
  at Atom.module.exports.Atom.startEditorWindow (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\atom.js:619:21)
  at Object.<anonymous> (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\window-bootstrap.js:12:8)
  at Object.<anonymous> (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\window-bootstrap.js:23:4)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (C:\Users\sayth\AppData\Local\atom\app-0.189.0\resources\app\src\babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at window.onload (file:///C:/Users/sayth/AppData/Local/atom/app-0.189.0/resources/app/static/index.js:52:25)

Commands

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "powerline"
    ]
  }
}

Installed Packages

# User
atom-beautify, vundefined
atom-django, v0.2.1
atom-jinja2, v0.5.0
autocomplete-css, v0.6.0
autocomplete-html, v0.5.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.7.1
autocomplete-snippets, v1.2.0
color-picker, v1.5.0
css-snippets, v0.5.0
django-templates, v0.4.0
flake8, v0.6.0
html-id-class-snippets, v1.4.1
javascript-snippets, v1.0.0
jsformat, v0.7.18
language-css-plus, v0.3.0
language-restructuredtext, v0.4.0
language-stylus, v0.1.0
linter, v0.12.0
linter-flake8, v1.3.0
linter-python-pep8, v0.2.0
markdown-preview-plus, v1.3.0
minimap, v4.7.5
open-last-project, v0.3.5
preview-plus, v1.1.19
project-palette-finder, v2.4.16
script, v2.18.0
Stylus, v0.7.0
Sublime-Style-Column-Selection, v1.2.3
vim-surround, v0.5.0
virtualenv, v0.6.2

# Dev
No dev packages

Can't install virtualenv plugin

Hey,

Despite the fact that I found about this plugin on atom.io I can't find it in "Install Packages" when searching for virtualenv. I use Atom 1.1.0.

Make new environments

This should

  • create a new environment on the filesystem in $WORKON_HOME
  • activate the new environment
  • change the selection on the status bar

Uncaught TypeError: Cannot read property 'addListener' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.174.0
System: linux 3.18.9-100.fc20.x86_64
Thrown From: virtualenv package, v0.6.2

Stack Trace

Uncaught TypeError: Cannot read property 'addListener' of undefined

At child_process.js:782

TypeError: Cannot read property 'addListener' of undefined
  at Object.exports.execFile (child_process.js:782:15)
  at Object.module.(anonymous function) [as execFile] (/usr/local/share/atom/resources/atom/common/lib/asar.js:448:20)
  at exports.exec (child_process.js:651:18)
  at VirtualenvManager.module.exports.VirtualenvManager.get_options (/home/igorferreira/.atom/packages/virtualenv/lib/virtualenv-manager.coffee:76:7)
  at /home/igorferreira/.atom/packages/virtualenv/lib/virtualenv-manager.coffee:39:16

Commands

     -0:45.9 core:save (atom-text-editor.editor)
  2x -0:25.7 core:confirm (atom-text-editor.editor.mini)
  3x -0:19.2 core:backspace (atom-text-editor.editor.mini)
     -0:06.4 core:confirm (atom-text-editor.editor.mini)
     -0:01.1 core:backspace (atom-text-editor.editor.mini)
     -0:00.0 core:confirm (atom-text-editor.editor.mini)

Config

{
  "core": {
    "disabledPackages": [
      "highlight-column"
    ],
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.21.4
atom-browser-webview, v0.6.0
atom-color-highlight, v3.0.8
atom-files, v0.1.5
atom-pair, v0.37.0
css-color-highlight, v0.3.0
git-projects, v1.8.1
highlight-line, v0.10.1
highlight-selected, v0.9.1
language-bro, v1.1.0
language-docker, v1.1.2
language-dockerfile, v0.1.0
language-java, v0.14.0
language-python-django-templates, v0.1.0
linter-lua, v0.1.3
linter-php, v0.0.11
log-console, v0.1.2
minimap-color-highlight, v4.1.0
open-last-project, v0.3.4
project-manager, v1.15.5
project-ring, v0.19.4
recent-projects, v0.3.0
script, v2.18.0
tabs-to-spaces, v0.8.1
terminal-panel, v1.9.2
terminal-status, v1.3.5
tree-view-git-projects, v0.2.2
underline-trailing-whitespace, v1.0.1
view-tail-large-files, v0.1.13
virtualenv, v0.6.2

# Dev
No dev packages

/cc @atom/core

Uncaught Error: "find" command fails on Linux

When I click on in the status bar to select a virtualenv, nothing good happens but the console show up with this error:

2 Uncaught Error: Command failed: /bin/sh -c find . -name activate -depth 3
   find: paths must precede expression: 3
   Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

The funny thing is that the syntax of the command appears to be perfectly fine, and in fact it runs without troubles if I issue the command /bin/sh -c find . -name activate -depth 3 directly on the terminal.
BUT... it appears that, if I try to run the command find . -name activate -depth 3 with /bin/bash, omitting /bin/sh -c, I receive the same error, but with some informations more:

find: warning: you have specified the -depth option after a non-option argument -name, but options are not positional (-depth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: paths must precede expression: 3
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

It appears that the Linux version of find do not take additional arguments on the '-depth' modifier. There is a '-maxdepth' that takes an integer argument, but I don't know if the effect is the same.

Don't have enough knowledge on coffescript or atom in general to try to work this out by myself, sorry. (perhaps prepending '/bin/sh -c' explicitly on the find command in 'packages/virtualenv/lib/virtualenv-manager.coffee' ? I tried, but then I get an Uncaught Error: stdout maxBuffer exceeded.)

I've compiled Atom version 0.121.0-99e0257 yesterday on a Gentoo Linux system, with nodejs 0.10.30, npm 1.4.21

Linux *** 3.12.21-gentoo-r1 #12 SMP PREEMPT Mon Jul 28 10:14:10 CEST 2014 x86_64 Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz GenuineIntel GNU/Linux

Don't know what other informations may help, please tell me if I can do something more.
Thank You!

Hotkeys

There should be hot keys for

  • switching environments
  • creating a new environment
  • deactivating the current environment

Sub and sibling directory environments

my projects usually include folders like env, .env, `.env3' with the related virtualenv

also sometimes i have a folder tree containing N related projects and 1-2 virtualenvs

Object.Object.defineProperty.get is deprecated.

Requiring SelectListView from atom is no longer supported.
Please require SelectListView from atom-space-pen-view instead:
{SelectListView} = require 'atom-space-pen-views'
Note that the API has changed slightly! Please read the docs at https://github.com/atom/atom-space-pen-views
Add "atom-space-pen-views": "^2.0.3" to your package dependencies.

Object.Object.defineProperty.get (/usr/share/atom/resources/app.asar/exports/atom.js:90:11)
Object.<anonymous> (/home/alexis/.atom/packages/virtualenv/lib/virtualenv-list-view.coffee:1:1)
Object.<anonymous> (/home/alexis/.atom/packages/virtualenv/lib/virtualenv-list-view.coffee:58:4)
Module._compile (module.js:452:26)
Object.requireCoffeeScript (/usr/share/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
Module.load (module.js:347:32)

virtualenv in various different locations

I like your tool. Thanks for making it. I sometimes have environments installed in a folder below the root folder of the project opened in Atom, different than your two available default setups. Can the location of the virtual environment be something that is configurable by the end user? Thanks.

Not compatible with the newest Atom

$ apm install virtualenv
Installing virtualenv to /Users/XXXXX/.atom/packages โœ—
No available version compatible with the installed Atom version: 1.0.7

I'm happy to help add compatibility, I just have to idea where to start.

PackageManager.on is deprecated.

Use PackageManager::onDidActivateInitialPackages instead

PackageManager.on (/usr/share/atom/resources/app.asar/src/package-manager.js:542:16)
PackageManager.once (/usr/share/atom/resources/app.asar/node_modules/emissary/lib/emitter.js:81:34)
Object.activate (/home/alexis/.atom/packages/virtualenv/lib/init.coffee:27:18)
Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:238:19)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:219:30)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:163:15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.