Is python package virtualenv necessary when I use python 3.3?

Generally, the virtualenv package is not required when using python3.3 or later, since it was incorporated into the standard library via PEP 405. As you note in the question, there are some relatively small differences between the latest versions of virtualenv and the venv package in the standard library. In part (e.g. –no-site-packages) this stems … Read more

How can I specify a custom Git branch in my Pipfile?

Here is some documentation on the GitHub repo for pipenv: You can install packages with pipenv from git and other version control systems using URLs formatted according to the following rule: <vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name> So, for example: [packages] requests = {git = “https://github.com/requests/requests.git”, editable = true, ref = “v2.20.1”} You can generate a Pipfile using the command … Read more

pip install requests[security] vs pip install requests: Difference

Why does the former install 3 additional packages? Using requests[security] instead of requests will install three additional packages: pyOpenSSL cryptography idna These are defined in extras_requires, as optional features with additional dependencies. Are there any things that I need to take care about when I push the code to production? You’d want to make sure … Read more

pylint false positive E0401 import errors in vscode while using venv

Pylint has some quirks. In this case it doesn’t know where to find your module because it’s in subdirectory of your venv path. To solve this: Put this setting in your workspace or folder settings: “python.linting.pylintArgs”: [ “–init-hook”, “import sys; sys.path.append(‘<path to folder your module is in>’)” ] or, maybe better Generate .pylintrc file. From … Read more

How I can make apt-get install to my virtualenv?

If you really need to do it this way, you can just copy the files that get installed globally directly into your virtualenv. For example I couldn’t get pycurl working since the required libraries weren’t installing, but apt-get install python-pycurl did. So I did the following: sudo apt-get install python-pycurl cp /usr/lib/python2.7/dist-packages/pycurl* ~/.virtualenvs/myenv/lib/python2.7/site-packages/ The install … Read more

Installing Anaconda into a Virtual Environment

I just tested the Anaconde 1.6 installer from http://continuum.io/downloads After downloading, I did: bash Anaconda-1.6.0-Linux-x86_64.sh If you take the defaults, you’ll end up with a directory anaconda in your home directory, completely separate from your EPD or system Python installation. To activate the anaconda installation’s default environment, do the following: source $HOME/anaconda/bin/activate ~/anaconda All Python … Read more

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