3 ms·
As long as you're using Python 3, pip and pyvenv are bundled with Python. Pip is also included with Python 2.7.9 and later for Python 2 users.
by Leynos 10y ago
As long as you're using Python 3, pip and pyvenv are bundled with Python. Pip is also included with Python 2.7.9 and later for Python 2 users.
- yladiz 10y agoHaving pip installed by default is really nice, so that it consolidates people to use pip unless they have specific use cases e.g. Anaconda users. However, pyvenv/virtualenv isn't that great for the reasons the poster mentions, specifically that you have to set up something instead of just installing in a local folder and referencing that. I do think that pip is more mature and in some ways is better than npm, but in the respect of where it installs modules, it's definitely behind (I do realize that this is also a Python issue wrt where it references modules, but installing modules global by default is a pip issue. At least they're working on doing more local installations by default[0]). I shouldn't have to worry about where my modules are installed in general, and if I'm working on multiple projects with different package versions, I shouldn't have to think about virtualenvs because if I mess up and forget to activate it, it may or may not give me strange errors during various parts of development. 0: https://github.com/pypa/pip/issues/1668 https://github.com/pypa/pip/issues/1668
- wlesieutre 10y agoI've also found venv to be a pain if you're trying to set up your editor to execute scripts in the virtual environment. Npm project? Build and run. Python project? Figure out how to make VS Code activate the environment first.
- yladiz 10y agoThat is one of the things I really appreciate about Node/npm. Drive space isn't a concern particularly, since packages aren't gigabytes in size, so having them installed locally is fine. The biggest gripe is you have to include `node_modules/` in your `.gitignore`.