You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
+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?
+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.
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:
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.
Activity
nitipit commentedon Jun 5, 2014
Quick fix for now by copying
activate_this.pyfrompython2 virtualenvcould help, I guess :9.sdlarsen commentedon Nov 11, 2014
Would indeed be nice with a fix.
makmanalp commentedon Dec 4, 2014
+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 commentedon Jan 12, 2015
+1
egoexpress commentedon Feb 10, 2015
+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 commentedon Feb 12, 2015
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:
gilgamezh commentedon Mar 18, 2015
+1
perseus-fyi commentedon Apr 3, 2015
+1
yoshiya0503 commentedon May 20, 2015
+1
toejough commentedon Jul 28, 2015
+1
renodesper commentedon Aug 28, 2015
+1
Fix `activate_this.py` does not exist, python-mode#406
c4traz commentedon Nov 3, 2015
+1
mvasilkov commentedon Nov 14, 2015
I second this issue very much.
k3rry0n commentedon Nov 15, 2015
+1
kuc2477 commentedon Nov 19, 2015
+1
tony commentedon Dec 17, 2015
+1
Or else python 3 is pretty much broken.
searene commentedon Dec 29, 2015
+1
tony commentedon Dec 30, 2015
#609 did the trick for me on Neovim, vim +python3 and also preserves python 2 completion.
Merge pull request #609 from mapler/develop
reven404 commentedon 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, foundVIRTUAL_ENV, modify the correct path will be fix this problem. see below:and then, reactive the virtual environment.
stale commentedon 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 commentedon Mar 6, 2018
Closed due to inactivity.