Upgrade python packages from requirements.txt using pip command

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 … Read more

Load multiple packages at once

How can I load a bunch of packages at once with out retyping the require command over and over? I’ve tried three approaches all of which crash and burn. Basically, I want to supply a vector of package names to a function that will load them. x<-c(“plyr”, “psych”, “tm”) require(x) lapply(x, require) do.call(“require”, x) 10 … Read more

How do I write good/correct package __init__.py files

My package has the following structure: mobilescouter/ __init__.py #1 mapper/ __init__.py #2 lxml/ __init__.py #3 vehiclemapper.py vehiclefeaturemapper.py vehiclefeaturesetmapper.py … basemapper.py vehicle/ __init__.py #4 vehicle.py vehiclefeature.py vehiclefeaturemapper.py … I’m not sure how the __init__.py files should be correctly written. The __init__.py #1 looks like: __all__ = [‘mapper’, ‘vehicle’] import mapper import vehicle But how should for … Read more

Where does R store packages?

The install.packages() function in R is the automatic unzipping utility that gets and install packages in R. How do I find out what directory R has chosen to store packages? How can I change the directory in which R stores and accesses packages? 4 Answers 4

Sibling package imports

I’ve tried reading through questions about sibling imports and even the package documentation, but I’ve yet to find an answer. With the following structure: ├── LICENSE.md ├── README.md ├── api │   ├── __init__.py │   ├── api.py │   └── api_key.py ├── examples │   ├── __init__.py │   ├── example_one.py │   └── example_two.py └── tests │   ├── __init__.py … Read more

How to view hierarchical package structure in Eclipse package explorer

OK here’s what I would like: in the Eclipse package explorer, I see the following: (dot represents a clickable arrow that I can use to expand the folder) PROJECT Source Folder Package Class Package.SubPackage Foo Bar Package.OtherSubPackage Package.OtherSubPackage.VerySubPackage OtherPackage Foobar OtherPackage.SubPackage Baz Long story short, I want to have many packages, each with many subpackages, … Read more