Questions tagged [package]

Package broadly refers to two things: 1) a usable unit/component of built/compiled software, or 2) a partition of the global namespace (Java).

Package may refer to a software component or the action of creating a package. The component could be a portion of a whole system, or the whole system itself, or any level of granularity between. Typical packaging mechanisms include: tar, jar, zip, rpm, war, exe. In this context it may also be used as a verb: "I was packaging my software and...".

Package is also a term from the java world to refer to the mechanism used to partition the global namespace with the intention of making it possible of having two classes with the same name and of creating a logical structure in which classes may be held. In java packages are most commonly represented by directories. Package is also a java keyword used at the start of a class file to indicate the package to which the class belongs. This is important because of 'package' scoped access rules, which allow classes in the same package to access a field/method/class.

Because of the ambiguity here it is best to use other tags to help define the meaning of this one. If you're asking about java packages, please include the Java tag. If you're asking about packaging up your software for deployment/use add other appropriate tags, such as 'Maven', 'Make', 'Ant', etc.

16844 questions
384
votes
16 answers

How to install a private NPM module without my own registry?

I've taken some shared code and put it in an NPM module, one I don't want to upload to the central registry. The question is, how do I install it from other projects? The obvious way is probably to set up my own NPM registry, but according to the…
futlib
  • 8,258
  • 13
  • 40
  • 55
369
votes
18 answers

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 │   └──…
zachwill
  • 4,395
  • 3
  • 19
  • 17
341
votes
13 answers

How do I update a Python package?

I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2). The 0.19.1 package has files in a number of locations including…
thompson
  • 3,429
  • 2
  • 15
  • 5
333
votes
6 answers

What is the purpose of the -m switch?

Could you explain to me what the difference is between calling python -m mymod1 mymod2.py args and python mymod1.py mymod2.py args It seems in both cases mymod1.py is called and sys.argv is ['mymod1.py', 'mymod2.py', 'args'] So what is the -m…
Charles Brunet
  • 21,797
  • 24
  • 83
  • 124
289
votes
7 answers

Does uninstalling a package with "pip" also remove the dependent packages?

When you use pip to install a package, all the required packages will also be installed with it (dependencies). Does uninstalling that package also remove the dependent packages?
Hossein
  • 40,161
  • 57
  • 141
  • 175
289
votes
34 answers

How can I solve "java.lang.NoClassDefFoundError"?

I've tried both the examples in Oracle's Java Tutorials. They both compile fine, but at run time, both come up with this error: Exception in thread "main" java.lang.NoClassDefFoundError: graphics/shapes/Square at Main.main(Main.java:7) Caused…
Jonathan Lam
  • 16,831
  • 17
  • 68
  • 94
283
votes
7 answers

How do I find a list of Homebrew's installable packages?

Recently I installed Brew. How can I retrieve a list of available brew packages to install?
dnlcrl
  • 5,022
  • 3
  • 32
  • 40
270
votes
4 answers

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?
Milktrader
  • 9,278
  • 12
  • 51
  • 69
241
votes
17 answers

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…
abhiomkar
  • 4,548
  • 7
  • 29
  • 24
241
votes
3 answers

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 …
Marten Bauer
  • 2,413
  • 3
  • 15
  • 4
231
votes
6 answers

How to read a (static) file from inside a Python package?

Could you tell me how can I read a file that is inside my Python package? My situation A package that I load has a number of templates (text files used as strings) that I want to load from within the program. But how do I specify the path to such…
ronszon
  • 2,997
  • 4
  • 19
  • 16
230
votes
10 answers

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…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
227
votes
7 answers

Are there best practices for (Java) package organization?

A little while ago, I saw a question answered here regarding the fine-grained organization of Java packages. For example, my.project.util, my.project.factory, my.project.service, etc. Are there best practices with regards to the organization of…
Cyntech
  • 5,362
  • 6
  • 33
  • 47
226
votes
11 answers

How to select a CRAN mirror in R

I'm trying to install a package through the R prompt by doing the following: install.packages('RMySQL') But the output is as follows: --- Please select a CRAN mirror for use in this session --- And nothing else! I can't find a solution to this…
Jim Johnson
  • 2,469
  • 2
  • 15
  • 13
225
votes
9 answers

NodeJS require a global module/package

I'm trying to install globally and then use forever and forever-monitor like this: npm install -g forever forever-monitor I see the usual output and also the operations that copy the files to the global path, but then if I try to require("forever");…
alexandernst
  • 14,352
  • 22
  • 97
  • 197