Install pycairo in virtualenv

Good news, everyone! I just released cairocffi: http://packages.python.org/cairocffi/ It’s a replacement for pycairo that installs with pip in a virtualenv, runs on Python 2 and 3, as well as PyPy. pip install cairocffi In your code: import cairocffi as cairo # Enjoy the same API as Pycairo. Feedback welcome. (Although the issue tracker might be … Read more

Specify Python Version for Virtualenv in Requirements.txt

Neither pip nor virtualenv install python (though pip tries). They use whatever you specify. You could write a README that mentions required Python version or provide a fabric script that can deploy to localhost and specify the version there. For example, instructions to install virtualenv, pip, distribute. For those people who don’t read instructions there … Read more

Copy complete virtualenv to another pc

Do the following steps on the source machine: workon [environment_name] pip freeze > requirements.txt copy requirements.txt to other PC On the other PC: create a virtual environment using mkvirtualenv [environment_name] workon [environment_name] pip install -r requirements.txt You should be done. Other Resources: How to Copy/Clone a Virtual Environment from Server to Local Machine

Mypy does not respect setting in mypy.ini to exclude folder from checking when called from VS Code

The issue is that VS Code is invoking mypy file by file. And mypy doesn’t use the exclude option when invoked on a single file. The workaround is using python.linting.ignorePatterns in the settings.json. “python.linting.ignorePatterns”: [ “venv/**/*.py” ] More info about the behaviour of exclude: Note that this flag only affects recursive discovery, that is, when … Read more

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