-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Python 3 support #58
Python 3 support #58
Conversation
hello, I am trying to get nodeenv installed in a virtualenv with python3.4, I get the following error: $ nodeenv node
During handling of the above exception, another exception occurred: Traceback (most recent call last): What should I do? |
You need to install python2. As Node's building system supports only python 2.6 or 2.7 Or try to install node.js from prebuilt package:
|
hey @ekalinin, thanks for reply! when I ran above code I get "* Environment already exists: node". Is that referring to my global npm install? Should I remove that? Im trying to determine a best practice for managing node packages/code in conjunction with my django/other projects... thanks! |
hey @erichonkanen
Nope, it's about virtualenv's folder. It already exists (
Seems, it better to use
If you're using virtualenv (for django) then it's better to use the same environment for python & node.js: # some environment for python/django
$ virtualenv env
$ . env/bin/activate
# install nodeenv into python's virtualenv
(env) $ pip install nodeenv
# add nodejs in the same virtualenv
(env) $ nodeenv -p --prebuilt |
Hi @ekalinin I wasn't even aware of the lack of python3 support for node until I came across my own error, and hence this issue -- for me, everything has worked fine with python3.4 and pyvenv-3.4. That is, until I tried to update from a requirements file:
All fine so far. However:
I've had a look at the source code, and it would appear that the Update: I figured out Thanks for your time. |
This pull request fixes #42 (support for python 3.*) . The solution relies on the fact that there is a python2 executable, and it can be found via the "which python2" command.
This solution was tested with success on Ubuntu Linux 13.10, with python 2.7.5 and 3.3.2 preinstalled.
on python 3 virtualenv created by pyenv-3.3 command and patched with following commands:
(setuptools & pip are included from the 3.4 version AFAIK)
on python 2 virtualenv created by virtualenv command