python development environment on a mac
Alexander Garcia Castro
alexgarciac at gmail.com
Wed Mar 15 13:39:29 UTC 2017
this may be unrelated but do anyone knows how can I change the python
version in spyder? I have some scripts that work with python 2 and others
with python 3.
On Wed, Mar 15, 2017 at 7:45 AM, Jeremy Lavergne <jeremy at lavergne.me> wrote:
> To that end, also check out using pip-tools along with virtualenv. This
> will allow you to determine the whole set of dependencies and their
> versions.
>
> Example shell script using pip-tools inside a virtualenv for producing a
> requirements.txt for `pip install --upgrade -r requirements.txt`:
>
> #!/usr/bin/env bash
> set -eux
> # needs pip-tools: sudo pip install -U pip-tools
>
> HERE="$(dirname $0)"
> REQUIREMENTS_FILE="${HERE}/requirements.txt"
>
> REQUIREMENTS_VE="/tmp/requirements_update_ve"
>
> rm -rf "${REQUIREMENTS_VE}"
> virtualenv "${REQUIREMENTS_VE}"
> set +eux
> . "${REQUIREMENTS_VE}/bin/activate"
> set -eux
> pip install -U pip-tools
>
> pip-compile --upgrade --rebuild --verbose --annotate
> --output-file=${REQUIREMENTS_FILE} - <<REQUIREMENTS
> awscli
> boto
> boto3
> lxml
> netaddr
> requests
> beautifulsoup4
> REQUIREMENTS
>
> rm -rf "${REQUIREMENTS_VE}"
>
>
> On 03/14/2017 10:42 PM, Kendall Shaw wrote:
> > virtualenv allows you to isolate your projects from each other and from
> > a surrounding python system. So, for example, 1 project that has a
> > dependency that is incompatible with a dependency in another project
> > can still work since they are isolated from each other.
>
>
--
Alexander Garcia
http://www.alexandergarcia.name/
http://www.usefilm.com/photographer/75943.html
http://www.linkedin.com/in/alexgarciac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20170315/6d146076/attachment.html>
More information about the macports-users
mailing list