Virtualenv – workon command not found

So far it was working fine but I restarted the shell The reason is because you restarted the shell. If you want this to work with each shell, you’ll need to add these to your ~/.bashrc file: After adding this, you’ll want to source ~/.bashrc so the changes take effect. You’ll find that you have access to virtualenvwrapper facilities in each new … Read more

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Recommendation for beginners: This is my personal recommendation for beginners: start by learning virtualenv and pip, tools which work with both Python 2 and 3 and in a variety of situations, and pick up other tools once you start needing them. PyPI packages not in the standard library: virtualenv is a very popular tool that creates isolated Python environments … Read more

PyLint “Unable to import” error – how to set PYTHONPATH?

There are two options I’m aware of. One, change the PYTHONPATH environment variable to include the directory above your module. Alternatively, edit ~/.pylintrc to include the directory above your module, like this: (Or in other version of pylint, the init-hook requires you to change [General] to [MASTER]) Both of these options ought to work. Hope that helps.

How to leave/exit/deactivate a Python virtualenv

Usually, activating a virtualenv gives you a shell function named: which puts things back to normal. I have just looked specifically again at the code for virtualenvwrapper, and, yes, it too supports deactivate as the way to escape from all virtualenvs. If you are trying to leave an Anaconda environment, the command depends upon your version of conda. Recent versions (like … Read more