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
216
votes
9 answers

How can I "go run" a project with multiple files in the main package?

I have a single file in the main package called main.go. Because the code isn't reusable I want to separate part of the code in a different file but in the same package. How do I split the contents of main.go into multiple files without creating a…
Neil
  • 8,925
  • 10
  • 44
  • 49
216
votes
10 answers

How to import local packages without gopath

I've used GOPATH but for this current issue I'm facing it does not help. I want to be able to create packages that are specific to a project: myproject/ ├── binary1.go ├── binary2.go ├── package1.go └── package2.go I tried multiple ways but how do…
user1529891
214
votes
15 answers

How do I view the size of npm packages?

When I search for packages on NPM, I would like to see package sizes (in KB or MB, etc). NPM doesn’t seem to show this information. How can I determine how much bloat an NPM package will add to my project? Update 2020 (copied from @styfle…
arielorvits
  • 5,235
  • 8
  • 36
  • 61
213
votes
20 answers

Does Android keep the .apk files? if so where?

After android installs an application from the Marketplace, does it keep the .apk file? Is there a standard location where Android would keep such files?
Gubatron
  • 6,222
  • 5
  • 35
  • 37
207
votes
3 answers

How Do I Document Packages in Java?

In the Java APIs I can see Javadoc comments for packages. How/where do I place Javadoc comments to document a package?
jjnguy
  • 136,852
  • 53
  • 295
  • 323
204
votes
9 answers

How to use custom packages

I'm trying to create and use a custom package in Go. It's probably something very obvious but I cannot find much information about this. Basically, I have these two files in the same folder: mylib.go package mylib type SomeType struct…
laurent
  • 88,262
  • 77
  • 290
  • 428
202
votes
6 answers

Npm install failed with "cannot run in wd"

I am trying to get my node environment set up on a new Ubuntu 12.04 instance, with Node 0.8.14 already installed, but I ran into problems when I try to run npm install. So when I try npm install, it says that I need to run it as root or…
E.H.
  • 3,271
  • 4
  • 19
  • 18
199
votes
15 answers

Can't import my own modules in Python

I'm having a hard time understanding how module importing works in Python (I've never done it in any other language before either). Let's say I have: myapp/__init__.py myapp/myapp/myapp.py myapp/myapp/SomeObject.py myapp/tests/TestCase.py Now I'm…
user623990
198
votes
15 answers

ModuleNotFoundError: No module named 'sklearn'

I want to import sklearn but there is no module apparently: ModuleNotFoundError: No module named 'sklearn' I am using Anaconda and Python 3.6.1; I have checked everywhere but still can't find answers. When I use the command: conda install…
Hareez Rana
  • 1,993
  • 2
  • 7
  • 3
197
votes
18 answers

Problems installing the devtools package

I wish to use the devtools package. I've run the following commands: > install.packages("devtools", dependencies = TRUE) .... > library(devtools) Error in library(devtools) : there is no package called ‘devtools’ What am I doing wrong? Edit: Here…
Evan Aad
  • 5,699
  • 6
  • 25
  • 36
194
votes
19 answers

How do I extract the contents of an rpm?

I have an rpm and I want to treat it like a tarball. I want to extract the contents into a directory so I can inspect the contents. I am familiar with the querying commands of an uninstalled package. I do not simply want a list of the contents of…
Jeff Sheffield
  • 5,768
  • 3
  • 25
  • 32
192
votes
3 answers

Execution of Python code with -m option or not

The python interpreter has -m module option that "Runs library module module as a script". With this python code a.py: if __name__ == "__main__": print __package__ print __name__ I tested python -m a to get "" <-- Empty…
prosseek
  • 182,215
  • 215
  • 566
  • 871
190
votes
14 answers

Node package ( Grunt ) installed but not available

I'm trying to build a github jquery-ui library using grunt, but after running npm install I still can't run the command according to the readme file. It just gives No command 'grunt' found: james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ grunt…
AJP
  • 26,547
  • 23
  • 88
  • 127
187
votes
19 answers

Unable to Install Any Package in Visual Studio 2015

I've tried every package I could possibly find and none of them will install in my project. I've installed every update listed in the Extensions and Updates list that were available. When I attempt to install SendGrid for example, this is the…
clockwiseq
  • 4,189
  • 9
  • 38
  • 61
187
votes
11 answers

how to install multiple versions of package using npm

Due to https://github.com/npm/npm/issues/2943, npm will never support the ability to alias packages and install multiple versions of the same package. The workarounds posted on the github issue might work for pure-JS modules, but as npm becomes a…
mark
  • 4,678
  • 7
  • 36
  • 46