Code Monkey home page Code Monkey logo

node-virtualenv's People

Contributors

andrewpmckenzie avatar extantpedant avatar lucbelliveau avatar mjpizz avatar

Stargazers

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

Watchers

 avatar  avatar

node-virtualenv's Issues

Can't spawn child python process

Hi,

I'm trying to follow your example but can't get the child process to spawn correctly. Here's my code:

var virtualenv = require("virtualenv"); var packagePath = require.resolve(__dirname + '/../../package.json'); var env = virtualenv(packagePath); var child = env.spawnPython(["../python/test.py"]);

and here's the error:

events.js:163 Uncaught Error: spawn /app/.node-virtualenv/bin/python ENOENT at exports._errnoException (util.js:1050) at Process.ChildProcess._handle.onexit (internal/child_process.js:193) at onErrorNT (internal/child_process.js:367) at _combinedTickCallback (internal/process/next_tick.js:80) at process._tickCallback (internal/process/next_tick.js:104)

Am I missing something obvious? My goal is to create a virtualenv when my app loads and then run all of my python code there so I don't have to worry about missing python modules. I'm running this on OS X with Python 2.7

Thanks

Invalid XML-RPC message

I'm not able to run the post install. I'm using node-virtualenv 0.3.0, and just updated virtualenv via pip.

This is the error I'm getting: Error: unable to retrieve version information for virtualenv

I appended the err object that's part of the error handler to see what that said and here it is: Error: Invalid XML-RPC message.

From googling around it seems this might be a http vs https issue, but I don't know for certain. It seems you're using pypi to determine virtualenv version. On this line: https://github.com/lukaszb/pypi/blob/master/src/pypi/client.coffee#L3 we can see it's hitting http://pypi.python.org/pypi. Curling this returns a 301 redirect to https which I believe is failing. If you try to switch the url to https there's an error about not supporting https.

Maybe this is an issue that should be brought up with pypi, not sure. Any ideas?

Can't make it work on Windows 10

I'm trying to make node-virtualenv work on Windows 10. I developed this project under a Fedora 23 installation, made a commit to a git repository and then fresh cloned it to a Windows 10 to make sure it would work. It's throwing the following error during postinstall:

> bower install && virtualenv-postinstall

Finding virtualenv 15.0.0
Downloading https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz
Unzipping https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz
Creating C:\Users\bruno\git\task-bruno-finger\.node-virtualenv
Cleaning C:/Users/bruno/git/task-bruno-finger/.node-virtualenv/.node-virtualenv-sources
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn python ENOENT
  at exports._errnoException (util.js:746:11)
  at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
  at child_process.js:1144:20
  at process._tickCallback (node.js:355:11)

I have Python 2.7 installed. In the end I have an empty .node-virtualenv folder in the root of my project where I should have the virtualenv installation.

Any suggestion?

error: "unable to retrieve version information for virtualenv" (from pypi)

$ ./node_modules/.bin/virtualenv-postinstall
(node:12121) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Finding virtualenv *
Error: unable to retrieve version information for virtualenv
  at /Users/myuser/Projects/myproject/node_modules/virtualenv/lib/virtualenv.js:184:14
  at /Users/myuser/Projects/myproject/node_modules/pypi/src/pypi/client.coffee:15:17
  at /Users/myuser/Projects/myproject/node_modules/xmlrpc/lib/client.js:130:9
  at callback (/Users/myuser/Projects/myprojectt/node_modules/xmlrpc/lib/deserializer.js:30:7)
  at Deserializer.onDone (/Users/myuser/Projects/myproject/node_modules/xmlrpc/lib/deserializer.js:79:12)
  at emitNone (events.js:86:13)
  at SAXStream.emit (events.js:185:7)
  at Object.SAXStream._parser.onend (/Users/myuser/Projects/myproject/node_modules/xmlrpc/node_modules/sax/lib/sax.js:190:10)
  at emit (/Users/myuser/Projects/myproject/node_modules/xmlrpc/node_modules/sax/lib/sax.js:640:35)
  at end (/Users/myuser/Projects/myproject/node_modules/xmlrpc/node_modules/sax/lib/sax.js:683:5)
  at Object.SAXParser.end (/Users/myuser/Projects/myproject/node_modules/xmlrpc/node_modules/sax/lib/sax.js:154:24)
  at SAXStream.end (/Users/myuser/Projects/myproject/node_modules/xmlrpc/node_modules/sax/lib/sax.js:248:18)
  at IncomingMessage.onend (_stream_readable.js:512:10)
  at IncomingMessage.g (events.js:286:16)
  at emitNone (events.js:91:20)
  at IncomingMessage.emit (events.js:185:7)
  at endReadableNT (_stream_readable.js:973:12)
  at _combinedTickCallback (internal/process/next_tick.js:74:11)
  at process._tickCallback (internal/process/next_tick.js:98:9)

I have both Python 2 and Python 3 installed, virtualenv is installed under both, too.

$ python --version
Python 2.7.12
$ python3 --version
Python 3.5.2
$ virtualenv --version
1.11.4
$ which virtualenv
/usr/local/bin/virtualenv

Electron Support

Has anyone had success building this project for Electron? I got it working quite easily in a development environment, but no success when packaging for distribution. I suspect that packaging with a prebuilt copy will do the trick, similar to the issue that SerialPort users were having, but I thought I'd pose the question here before going down the rabbit hole. It's a really great project and has come in very handy beyond my core need for it.

When virtualenv flags are changed, postinstall should reinstall

For example, if you add new flags in your package.json like:

"virtualenv": {
  "flags": ["--python=Python2.7"]
}

For convenience, the virtualenv should be rebuilt so that it has the correct Python version (rather than requiring the user to remove the old directory first).

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.