Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tb when using Python3 venv #406

Closed
JohnSpeno opened this issue Mar 26, 2014 · 22 comments
Closed

tb when using Python3 venv #406

JohnSpeno opened this issue Mar 26, 2014 · 22 comments
Labels

Comments

@JohnSpeno
Copy link

Using python-mode within a python 3 virtualenv has an issue:

% vim
Error detected while processing /Users/speno/.vimrc:
line 224:
Traceback (most recent call last):
File "", line 8, in
IOError: [Errno 2] No such file or directory: '/Users/speno/Documents/venvs/
pika/bin/activate_this.py'

It's true. The virtualenvs created using python3's pyvenv command do not have a bin/activate_this.py file.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nitipit
Copy link

nitipit commented Jun 5, 2014

Quick fix for now by copying activate_this.py from python2 virtualenv could help, I guess :9.

@sdlarsen
Copy link

Would indeed be nice with a fix.

@makmanalp
Copy link

+1 here. The thing is, when the virtualenv is activated and you run vim in it, you should already be in the virtualenv and so would one really need to run activate_this?

e.g. http://bugs.python.org/issue21496

@ypomortsev
Copy link

+1

@egoexpress
Copy link

+1
Creating 'Scripts' and touching 'Scripts/activate_this.py' is a workaround but it would be better if python-mode would properly support Python3 venv.

@relativistic
Copy link

This also seems to be a problem using python 2 if you use Enthought's canopy. Canopy uses a backport of venv:
https://support.enthought.com/entries/21802240-Use-venv-not-virtualenv-with-Canopy-Python

Using enthought's canopy, I get:

[Pymode]: error: [Errno 2] No such file or directory: '/Users/cpl29573/Library/Enthought/Canopy_64bit/User/Scripts/activate_
this.py'

@gilgamezh
Copy link

+1

4 similar comments
@rusnasonov
Copy link

+1

@yoshiya0503
Copy link

+1

@toejough
Copy link

+1

@renodesper
Copy link

+1

mapler added a commit to mapler/python-mode that referenced this issue Oct 11, 2015
@ghost
Copy link

ghost commented Oct 29, 2015

please, fix it :)

@c4traz
Copy link

c4traz commented Nov 3, 2015

+1

@mvasilkov
Copy link

I second this issue very much.

@k3rry0n
Copy link

k3rry0n commented Nov 15, 2015

+1

1 similar comment
@kuc2477
Copy link

kuc2477 commented Nov 19, 2015

+1

@tony
Copy link

tony commented Dec 17, 2015

+1

Or else python 3 is pretty much broken.

@searene
Copy link

searene commented Dec 29, 2015

+1

@tony
Copy link

tony commented Dec 30, 2015

#609 did the trick for me on Neovim, vim +python3 and also preserves python 2 completion.

klen added a commit that referenced this issue Jan 11, 2016
Fix `activate_this.py` does not exist, #406
@reven404
Copy link

reven404 commented Nov 5, 2016

I have also encountered this problem.
the main reason for this problem is the python3 venv module to use the absolute path in the virtual environment configuration.
check <virtual environment name>/bin/activate, found VIRTUAL_ENV, modify the correct path will be fix this problem. see below:

VIRTUAL_ENV = "/ Users /../../<virtual environment name>"
Export VIRTUAL_ENV¬

and then, reactive the virtual environment.

@stale
Copy link

stale bot commented Feb 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Feb 13, 2018
@stale
Copy link

stale bot commented Mar 6, 2018

Closed due to inactivity.

@stale stale bot closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests