Giter Site home page Giter Site logo

sublime-text-virtualenv's People

Contributors

adrianlc avatar snaily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sublime-text-virtualenv's Issues

Issue executing postactivate script when using a virtualenv

postactivate seems to not be loaded.

To test it I added a path to $PYTHONPATH:

export OLD_PYTHONPATH="$PYTHONPATH"

if [ -z $PYTHONPATH ]; then
    export PYTHONPATH=/home/bsemene/dev/logging_handlers
else
    export PYTHONPATH=$PYTHONPATH:/home/bsemene/dev/logging_handlers
fi

On the console I execute the following in my virtualenv:

$python -c "import sys ; import os ; print os.getenv('PYTHONPATH') in sys.path"
True

And on sublime (after activating the virtualenv):
print '/home/bsemene/dev/logging_handlers' in sys.path returns False

Support virtualenv inside project directories

I generally have the habit to put my virtualenvs inside each project directory, and I use direnv to generate and activate my virtualenv automatically inside the project directory in the terminal.

However, this workflow seems not supported by this plugin: I can't find a way to specify in "virtualenv_directories" to search in the current project directory.

Is this possible currently?
If not, can this be added?

ST4 does not load Default into the Python 3.3 environment any longer

import Default as sublime_default

Tried with ST4 and got the following in the console

Packages/Virtualenv.sublime-package/commands.py", line 126, in <module>
AttributeError: 'module' object has no attribute 'exec'

To get this package working in ST4 I unzipped the package, created a file in the root of this package called .python-version with the contents of 3.8, and zipped it up. Now working and backwards compatible with ST2 and ST3. Will submit a PR.

Activating a virtual environment in Windows doesn't change the build system

I have Anaconda installed with Python 2.7 on Windows 10, and I created a virtual environment that uses Python 3.5. If I activate the Python 3.5 virtual environment within SublimeText and run the following code

import sys print(sys.version)

I get the following output

2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)]

which is obviously not Python 3.5. Opening a command prompt, activating my Python 3.5 virtual environment, and executing the same code yields

3.5.3 |Anaconda 4.4.0 (64-bit)| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)]

Additionally, I've saved the Sublime Project to see if it's setting the virtual environment correctly, and it appears to be

"virtualenv": "C:\\Users\\My Name\\Anaconda2\\envs\\python3env"

What might be prohibiting my SublimeText installation from building with the alternative environment?

No Virtualenv upon ST3 upgrade build 3176

I recently upgraded to ST3 3176. When I browse packages, virtualenv is not there. when I search to install or select activate, it does not come up. Is this just me, or is there a problem with your app and the upgrade? Is there a fix? Thanks.

ImportError with locally defined modules

I use this plugin with SublimeREPL and have had no problems until now. However, I'm just now trying to import a locally defined module within SublimeREPL + virtualenv, and I'm getting an ImportError.

Here's my folder structure (main.py tries to import a Class defined in utilities.py):

folder/
main.py
utilities.py
init.py

If I use SublimeREPL with no virtualenv, I can successfully import the module.
If I use bash and activate the virtualenv from there, and then open up a Python shell, I can also successfully import the module.

Any ideas? Thanks!

Can't find egg-linked development module

I'm developing a Python package (in Windows) which is linked to my global site-packages with the usual setup.py develop. When I activate the virtualenv using the plugin and try to import mymodule I get an ImportError. Other locally installed packages (i.e. not egg-linked) work fine.

I thought this might be an issue with my virtualenv, but if I activate it from a command prompt and open a Python shell I can import my module without any issues. It seems like there's an problem with Sublime not recognizing egg-linked modules -- is there some workaround for this?

Many thanks

Lists duplicate or more venvs when activating

I'm running ST3 build 3114 with the virtualenv package. I added 3 venvs using the directory add option. Later on I deleted those venvs and recreated them, re-adding the directory. Now after this when I attempt to Activate one of the venvs, it lists 6, 2 sets of 3s. Then I re-added the venvs from the directory and now it shows 9, 3 sets of 3s. I can't delete one of the options as it will delete the venv i created. But if I do delete it, then it's removed from all 3 sets. Here is a screenshot I hope can explain it better: http://i.imgur.com/KOiOYkK.png

It seems not working on Mac OS

I have tried the latest version on Mac OS, but I still cannot build my project properly using virtualenv. In my virtualenv I used Python 3.5, but when I used python + virtualenv to build, it used Python 2.9.

When I do virtualenv : activate, I didn't get anything and the building still does not work.

Any suggestions?

Doesn't load correct python on Mac OS X

Hi there,

I was hoping this might be the easy answer to my problems of deal with virtualenvs within ST3. I followed all the instructions and it doesn't seem to work on Mac OS. When I try to activate a virtualenv from the command palette, it correctly lists the environments. There don't seem to be any issues with running the activate command; however even when I choose the Python + Virtualenv build system specifically, it doens't seem to run python within the activated environment.

Any suggestions as to how to diagnose the issues? Would be great to get this working.

Thanks!

how to automatically enter into virtualenv-python2.7 without manually activate?Thanks

Sorry to interrupt.
Could you tell me how to automatically enter virtualenv without manually activate?
I want an effect like this:
①double click a xx.py file and enter into sublime
②without manual activate the virtualenv,it already enter into python2.7 of virtualenv
③if I want to change to virtualenv-python3.5,I can use shift+ctrl+p->activate->python3.5

Why I want this effect?
Because in my .bashrc ,I added the following 3 lines
**alias py2.7="source /home/appleyuchi/.virtualenvs/python2.7/bin/activate&&deactivate&&source /home/appleyuchi/.virtualenvs/python2.7/bin/activate"

alias py3.5="source /home/appleyuchi/.virtualenvs/python3.5/bin/activate&&deactivate&&source /home/appleyuchi/.virtualenvs/python3.5/bin/activate"
py2.7**

So,dear sir ,does sublime-text-virtualenv has similar settings?
Thanks very much .
if i lauch sublime in terminal already in virtualenv-python2.7,then I cannot use sublime-text-virtualenv to change to python3.5,so this is not a good solution.
Many Thanks again

UTF-8 Local Issue on Mac

Hi,
When running this on a Mac I get a UTF-8 local error.

When running scripts through the terminal:

source venv/bin/activate
python test.py

I am able to resolve the issue by editing the ~./bash_profile and adding two lines -
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

cancel build

When running a python file using the virtualenv package, it is not possible to cancel the build using the 'Cancel Build' button located in Tools tab

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.