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
3611
votes
14 answers

What is __init__.py for?

What is __init__.py for in a Python source directory?
Mat
  • 82,161
  • 34
  • 89
  • 109
2931
votes
35 answers

Find the version of an installed npm package

How can I find the version of an installed Node.js or npm package? This prints the version of npm itself: npm -v This prints a cryptic error: npm version This prints the package version on the registry (i.e., the…
Laurent Couvidou
  • 32,354
  • 3
  • 30
  • 46
1209
votes
18 answers

What is the difference between --save and --save-dev?

What is the difference between: npm install [package_name] and: npm install [package_name] --save and: npm install [package_name] --save-dev What does this mean? And what is really the effect of --save and -dev keywords?
nfort
  • 12,234
  • 3
  • 13
  • 13
986
votes
19 answers

How to list npm user-installed packages

How do I list the user-installed / environment package only in npm? When I do npm -g list, it outputs every package and their dependencies. Instead I'd like to see the packages installed in the current working project or environment.
lolski
  • 16,231
  • 7
  • 34
  • 49
930
votes
5 answers

What is thread safe or non-thread safe in PHP?

I saw different binaries for PHP, like non-thread or thread safe? What does this mean? What is the difference between these packages?
O..
  • 10,925
  • 5
  • 20
  • 8
832
votes
21 answers

How to fix "Attempted relative import in non-package" even with __init__.py

I'm trying to follow PEP 328, with the following directory structure: pkg/ __init__.py components/ core.py __init__.py tests/ core_test.py __init__.py In core_test.py I have the following import statement from…
skytreader
  • 11,467
  • 7
  • 43
  • 61
827
votes
10 answers

What's the difference between a module and package in Python?

What's the difference between a module and package in Python? See also: What's the difference between "package" and "module"? (for other languages)
Dave
  • 9,033
  • 4
  • 21
  • 20
812
votes
10 answers

Can I force pip to reinstall the current version?

I've come across situations where a current version of a package seems not to be working and requires reinstallation. But pip install -U won't touch a package that is already up-to-date. I see how to force a reinstallation by first uninstalling…
orome
  • 45,163
  • 57
  • 202
  • 418
716
votes
13 answers

How do I remove packages installed with Python's easy_install?

Python's easy_install makes installing new packages extremely convenient. However, as far as I can tell, it doesn't implement the other common features of a dependency manager - listing and removing installed packages. What is the best way of…
ire_and_curses
  • 68,372
  • 23
  • 116
  • 141
701
votes
7 answers

How can I specify the required Node.js version in package.json?

I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the packages.json file, so that the installer will automatically check and inform the users if they need to upgrade?
Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183
694
votes
18 answers

How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?

I tried to install a package, using install.packages("foobarbaz") but received the warning Warning message: package 'foobarbaz' is not available (for R version x.y.z) Why doesn't R think that the package is available? See also these questions…
Richie Cotton
  • 118,240
  • 47
  • 247
  • 360
688
votes
4 answers

What is a Python egg?

I'm trying to understand how Python packages work. Presumably eggs are some sort of packaging mechanism, but what would be a quick overview of what role they play and may be some information on why they're useful and how to create them?
Bialecki
  • 30,061
  • 36
  • 87
  • 109
676
votes
23 answers

How to install pip with Python 3?

I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2. How can I install pip with Python 3?
deamon
  • 89,107
  • 111
  • 320
  • 448
661
votes
17 answers

How can I remove a package from Laravel using PHP Composer?

What is the correct way to remove a package from Laravel using PHP Composer? So far I've tried: Remove declaration from file composer.json (in the "require" section) Remove any class aliases from file app.php Remove any references to the package…
igaster
  • 12,983
  • 6
  • 26
  • 27
658
votes
12 answers

How to unload a package without restarting R

I'd like to unload a package without having to restart R (mostly because restarting R as I try out different, conflicting packages is getting frustrating, but conceivably this could be used in a program to use one function and then another--although…
Ari B. Friedman
  • 71,271
  • 35
  • 175
  • 235
1
2 3
99 100