Unable to install boto3

There is another possible scenario that might get some people as well (if you have python and python3 on your system): pip3 install boto3 Note the use of pip3 indicates the use of Python 3’s pip installation vs just pip which indicates the use of Python 2’s.

What’s the difference between “virtualenv” and “-m venv” in creating Python Virtual environments

venv is a package shipped directly with python 3. So you don’t need to pip install anything. virtualenv instead is an independent library available at https://virtualenv.pypa.io/en/stable/ and can be install with pip. They solve the same problem and work in a very similar manner. If you use python3 I suggest to avoid an “extra” dependency … Read more

How to enable a virtualenv in a systemd service unit?

The virtualenv is “baked into the Python interpreter in the virtualenv”. This means you can launch python or console_scripts directly in that virtualenv and don’t need to activate the virtualenv first or manage PATH yourself.: ExecStart={{ venv_home }}/bin/fooservice –serve-in-foreground or ExecStart={{ venv_home }}/bin/python {{ venv_home }}/fooservice.py –serve-in-foreground and remove the EnvironmentFile entry. To verify that … Read more

List all virtualenv created by virtualenvwrapper

You can use the lsvirtualenv, in which you have two options “long” or “brief”: “long” option is the default one, it searches for any hook you may have around this command and executes it, which takes more time. “brief” just take the virtualenvs names and prints it. brief usage: $ lsvirtualenv -b long usage: $ … Read more

How can a shell function know if it is running within a virtualenv?

if [[ “$VIRTUAL_ENV” != “” ]] then INVENV=1 else INVENV=0 fi // or shorter if you like: [[ “$VIRTUAL_ENV” == “” ]]; INVENV=$? EDIT: as @ThiefMaster mentions in the comments, in certain conditions (for instance, when starting a new shell – perhaps in tmux or screen – from within an active virtualenv) this check may … Read more

Activate virtualenv and run .py script from .bat

You do not need to activate the virtual environment while running in .bat. All you need to do is to run the python.exe file in your virtual environment. {path to virtual environment directory}/Scripts/python.exe path/to/your/file.py In Windows Task Scheduler you can specify the path in which the command prompt will open. So all you need to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)