requirements.txt

Global and local python installations, and accidentally running a requirements file outside of virtualenv

孤者浪人 提交于 2019-12-05 20:59:23
So I was googling an event where pip required sudo privileges,and I came across the following two threads What are the risks of running 'sudo pip'? and Is it acceptable & safe to run pip install under sudo? The first thread talks about the security risk of running an unknown .py file with pip (makes sense), but from the second one I almost got the impression that there exists a global and local python installation that you should not mix up. I guess it makes it sense that you can have a global installation for all users and then maybe an appended path to local packages for each user, but is

Pip requirements outputting global packages

我怕爱的太早我们不能终老 提交于 2019-12-05 16:28:31
I have a Virtual env for my django project, but when I hit pip freeze , I get what must be a global site package list, includes too many packages, like ubuntu packages and so much irrelevant stuff. This happens whether virtualenv is active or not. My site packages list looks a bit slim too, so I wonder whether venv has been working at all. (env)~/code/django/ssc/dev/env/lib/python2.7/site-packages> ls django Django-1.4-py2.7.egg-info easy-install.pth pip-1.0.2-py2.7.egg setuptools-0.6c11-py2.7.egg setuptools.pth What's my problem? If your virtual environment has access to the system's site

Is there something like requirements.txt for R? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-05 11:46:46
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . Is there a functionality like requirements.txt in Python, where you can store a list of packages used into a file, and whenever other people want to run your programs and need to install the dependencies, they can just do pip install -r requirements.txt . I think, this helps a lot when deploying R

CPAN Requirements File

送分小仙女□ 提交于 2019-12-05 02:16:38
With pip you are able to create a requirements file to specify which libraries to install. Is there an equivalent for perl modules using CPAN? I came across ExtUtils::MakeMaker, but this seems like the make file is for each module specifically. I guess to try and give a better idea of what I am asking is if there is a way to do something like cpan install -r requirements.txt and then specify which modules to install in that requirements file. Thanks in advance! I think Carton is what you're looking for. To start using Carton, install it. Then create a cpanfile with your dependencies: require

Error when running 'pip install -r requirements.txt --upgrade'

自闭症网瘾萝莉.ら 提交于 2019-12-04 06:32:34
问题 When i run following command in my Django project: pip install -r requirements.txt --upgrade I get following error: Detected a distutils installed project ('argparse') which we cannot uninstall. The metadata provided by distutils does not contain a list of files which have been installed, so pip does not know which files to uninstall. My requirements.txt file is as follow: Django==1.8.1 MySQL-python==1.2.5 pycrypto==2.6.1 Pillow==2.4.0 simplejson==2.3.2 uWSGI==2.0.8 pyBarcode==0.7 python

Add pip requirements to docker image in runtime

别来无恙 提交于 2019-12-04 03:51:52
I want to be able to add some extra requirements to an own create docker image. My strategy is build the image from a dockerfile with a CMD command that will execute a "pip install -r" command using a mounted volume in runtime. This is my dockerfile: FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y python-pip python-dev build-essential RUN pip install --upgrade pip WORKDIR /root CMD ["pip install -r /root/sourceCode/requirements.txt"] Having that dockerfile I build the image: sudo docker build -t test . And finally I try to attach my new requirements using this command: sudo docker

Is there any way to show the dependency trees for pip packages?

…衆ロ難τιáo~ 提交于 2019-12-03 02:32:39
问题 I have a project with multiple package dependencies, the main requirements being listed in requirements.txt . When I call pip freeze it prints the currently installed packages as plain list. I would prefer to also get their dependency relationships, something like this: Flask==0.9 Jinja2==2.7 Werkzeug==0.8.3 Jinja2==2.7 Werkzeug==0.8.3 Flask-Admin==1.0.6 Flask==0.9 Jinja2==2.7 Werkzeug==0.8.3 The goal is to detect the dependencies of each specific package: Werkzeug==0.8.3 Flask==0.9 Flask

Upgrade python packages from requirements.txt using pip command

心不动则不痛 提交于 2019-12-03 01:25:20
问题 How do I upgrade all my python packages from requirements.txt file using pip command? tried with below command $ pip install --upgrade -r requirements.txt Since, the python packages are suffixed with the version number ( Django==1.5.1 ) they don't seem to upgrade. Is there any better approach than manually editing requirements.txt file? EDIT As Andy mentioned in his answer packages are pinned to a specific version, hence it is not possible to upgrade packages through pip command. But, we can

Is there any way to show the dependency trees for pip packages?

别来无恙 提交于 2019-12-02 16:28:40
I have a project with multiple package dependencies, the main requirements being listed in requirements.txt . When I call pip freeze it prints the currently installed packages as plain list. I would prefer to also get their dependency relationships, something like this: Flask==0.9 Jinja2==2.7 Werkzeug==0.8.3 Jinja2==2.7 Werkzeug==0.8.3 Flask-Admin==1.0.6 Flask==0.9 Jinja2==2.7 Werkzeug==0.8.3 The goal is to detect the dependencies of each specific package: Werkzeug==0.8.3 Flask==0.9 Flask-Admin==1.0.6 And insert these into my current requirements.txt . For example, for this input: Flask==0.9

Upgrade python packages from requirements.txt using pip command

最后都变了- 提交于 2019-12-02 14:47:56
How do I upgrade all my python packages from requirements.txt file using pip command? tried with below command $ pip install --upgrade -r requirements.txt Since, the python packages are suffixed with the version number ( Django==1.5.1 ) they don't seem to upgrade. Is there any better approach than manually editing requirements.txt file? EDIT As Andy mentioned in his answer packages are pinned to a specific version, hence it is not possible to upgrade packages through pip command. But, we can achieve this with pip-tools using the following command. $ pip-review --auto this will automatically