Virtualenv uses wrong python, even though it is first in $PATH

My problem was that i recently moved my project with virtualenv to another location, due to this activate script had wrong VIRTUAL_ENV path. $ cat path_to_your_env/bin/activate … # some declarations VIRTUAL_ENV=”/path_to_your_env/bin/python” # <– THIS LINE export VIRTUAL_ENV … # some declarations To fix this, just update VIRTUAL_ENV in activate script. Also you maybe need to … Read more

Creating a virtualenv with preinstalled packages as in requirements.txt

Typically the steps you always takes are: git clone <repo> cd <repo> pip install virtualenv (if you don’t already have virtualenv installed) virtualenv venv to create your new environment (called ‘venv’ here) source venv/bin/activate to enter the virtual environment pip install -r requirements.txt to install the requirements in the current environment

“cannot find -lssl; cannot find -lcrypto” when installing mysql-python?

You need to have installed the development libraries of OpenSSL. It can be a libssl-dev, libssl-devel if your distribution provides separated packages for the dev libraries. Or install the complete openssl package if they don’t. (venv)➜ src pip install mysql-python==1.2.5 Downloading/unpacking mysql-python==1.2.5 Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded Running setup.py (path:/home/braiam/src/venv/build/mysql-python/setup.py) egg_info for package mysql-python Installing … Read more

how to copy modules from one virtualenv to another

As long as you’re moving them from one virtualenv to another on the same machine, you could easily just do: $ cp -r [env1]/lib/pythonX.X/site-packages/* [env2]/lib/pythonX.X/site-packages/ However, if the environments are on different machines or utilizing different versions of python or some other major difference, it’s probably not a good idea. In general it’s much safer … Read more

How to use the same Python virtualenv on both Windows and Linux

Short answer, NO. But you can share the venv build scripts. pip freeze all libraries to a requirements.txt file. pip freeze > requirements.txt Create the venv on each OS: python -m venv env source env/bin/activate pip install -r requirements.txt # Install all the libs. There are several reasons why venvs cannot be shared across OSes: … Read more

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