Skip to main content

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).

Filter by
Sorted by
Tagged with
208 votes
19 answers
328k views

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. ...
Jeff Sheffield's user avatar
208 votes
9 answers
206k views

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 ...
laurent's user avatar
  • 89.9k
207 votes
3 answers
186k views

Execution of Python code with -m option or not [duplicate]

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 ...
prosseek's user avatar
  • 188k
207 votes
15 answers
537k views

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/...
user avatar
205 votes
6 answers
136k views

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 ...
E.H.'s user avatar
  • 3,381
202 votes
19 answers
228k views

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 ...
Evan Aad's user avatar
  • 5,879
201 votes
12 answers
132k views

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 ...
mark's user avatar
  • 4,940
192 votes
2 answers
91k views

How to import and use different packages of the same name

For example, I want to use both text/template and html/template in one source file. But the code below throw errors. import ( "fmt" "net/http" "text/template" // template redeclared as ...
hardPass's user avatar
  • 20.3k
191 votes
15 answers
432k views

How to list all installed packages and their versions in Python?

Is there a way in Python to list all installed packages and their versions? I know I can go inside python/Lib/site-packages and see what files and directories exist, but I find this very awkward. ...
jsalonen's user avatar
  • 30.1k
191 votes
4 answers
144k views

Can I use __init__.py to define global variables?

I want to define a constant that should be available in all of the submodules of a package. I've thought that the best place would be in in the __init__.py file of the root package. But I don't know ...
Andrei Vajna II's user avatar
191 votes
16 answers
444k views

Go build: "Cannot find package" (even though GOPATH is set)

Even though I have GOPATH properly set, I still can't get "go build" or "go run" to find my own packages. What am I doing wrong? $ echo $GOROOT /usr/local/go $ echo $GOPATH /home/mitchell/go $ cat ~...
MitchellSalad's user avatar
190 votes
14 answers
147k views

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@...
AJP's user avatar
  • 27.8k
188 votes
8 answers
166k views

LaTeX package for syntax highlighting of code in various languages

I am looking for a LaTeX package that does syntax highlighting on code. For example, right now I use the verbatim block to write code: \begin{verbatim} <html> <head> ...
Vincent Ramdhanie's user avatar
187 votes
19 answers
125k views

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 ...
clockwiseq's user avatar
  • 4,209
186 votes
9 answers
79k views

Making certain methods visible only to particular packages

I have two packages in my project: odp.proj and odp.proj.test. There are certain methods that I want to be visible only to the classes in these two packages. How can I do this? If there is no concept ...
Nick Heiner's user avatar
185 votes
16 answers
226k views

Check for installed packages before running install.packages() [duplicate]

I have an R script that is shared with several users on different computers. One of its lines contains the install.packages("xtable") command. The problem is that every time someone runs the script, ...
Waldir Leoncio's user avatar
181 votes
21 answers
347k views

Check if Python Package is installed

What's a good way to check if a package is installed while within a Python script? I know it's easy from the interpreter, but I need to do it within a script. I guess I could check if there's a ...
Kevin's user avatar
  • 2,481
181 votes
5 answers
245k views

Go update all modules

Using this module as an example (using a specific commit so others will see what I see): git clone git://github.com/walles/moar Set-Location moar git checkout d24acdbf I would like a way to tell Go ...
Zombo's user avatar
  • 1
180 votes
8 answers
97k views

How to add a package from GitHub in Flutter?

I need to use the latest source code of a package and the latest source hasn't been published yet. What should I write into pubspec.yaml to get a package in Github? The code below doesn't work. It ...
Kostya Vyrodov's user avatar
179 votes
7 answers
121k views

Should I commit yarn.lock and package-lock.json files?

We're using yarn for all our deterministic pkg installations but don't prevent the user from using npm - I'm guessing having both these files will cause issues however. Should one be added to your ....
BisonAVC's user avatar
  • 2,040
178 votes
4 answers
86k views

Does it make sense to use Conda + Poetry?

Does it make sense to use Conda + Poetry for a Machine Learning project? Allow me to share my (novice) understanding and please correct or enlighten me: As far as I understand, Conda and Poetry have ...
Seub's user avatar
  • 2,982
178 votes
17 answers
111k views

How to npm publish specific folder but as package root

I have a project that include a gulp task for building and packaging the sources and release in a directory called dist. My goal is publish it as a npm package, but only my dist folder. The npm ...
robsonrosa's user avatar
  • 2,658
177 votes
12 answers
69k views

Painless way to install a new version of R?

Andrew Gelman recently lamented the lack of an easy upgrade process for R (probably more relevant on Windows than Linux). Does anyone have a good trick for doing the upgrade, from installing the ...
Shane's user avatar
  • 99.7k
174 votes
12 answers
634k views

How to make rpm auto install dependencies

I have built two RPM packages proj1-1.0-1.x86_64.rpm libtest1-1.0-1.x86_64.rpm proj1 depends on the file libtest1.so being present and it is reflected correctly in the RPM packages as seen here: ...
HAL's user avatar
  • 3,978
171 votes
10 answers
35k views

How to organize large R programs?

When I undertake an R project of any complexity, my scripts quickly get long and confusing. What are some practices I can adopt so that my code will always be a pleasure to work with? I'm thinking ...
Dan Goldstein's user avatar
170 votes
7 answers
193k views

Is it possible to change the package name of an Android app on Google Play?

I would like to know whether it is technically possible, not whether it is easy or not, to change the actual package name of an Android app that is on Google Play. What I mean by package name is the ...
user2426316's user avatar
  • 7,251
164 votes
7 answers
146k views

How to remove a package in sublime text 2

I would like to remove and/or deactivate the Emmet package in Sublime Text 2. Should I just remove the Emmet directory or what is the typical workflow for removal of a package?
thomasstephn's user avatar
  • 3,805
163 votes
9 answers
122k views

Download source from npm without installing it

How can I download the source code of a package from npm without actually installing it (i.e. without using npm install thepackage)?
AURIGADL's user avatar
  • 1,942
163 votes
5 answers
86k views

How do I create a namespace package in Python?

In Python, a namespace package allows you to spread Python code among several projects. This is useful when you want to release related libraries as separate downloads. For example, with the ...
joeforker's user avatar
  • 41.3k
160 votes
15 answers
294k views

How do I import a specific version of a package using go get?

coming from a Node environment I used to install a specific version of a vendor lib into the project folder (node_modules) by telling npm to install that version of that lib from the package.json or ...
Wilk's user avatar
  • 8,003
157 votes
6 answers
80k views

Access data in package subdirectory [duplicate]

I am writing a python package with modules that need to open data files in a ./data/ subdirectory. Right now I have the paths to the files hardcoded into my classes and functions. I would like to ...
Jacob Lyles's user avatar
  • 10.3k
156 votes
5 answers
62k views

Java packages com and org

What are the meaning of the packages org and com in Java?
Gabriel's user avatar
  • 1,569
153 votes
8 answers
208k views

Print a list of all installed node.js modules

In a node.js script that I'm working on, I want to print all node.js modules (installed using npm) to the command line. How can I do this? console.log(__filename); //now I want to print all ...
Anderson Green's user avatar
147 votes
7 answers
231k views

Package structure for a Java project?

Whats the best practice for setting up package structures in a Java Web Application? How would you setup your src, unit test code, etc?
mawaldne's user avatar
  • 3,989
144 votes
8 answers
565k views

How to install Python packages from the tar.gz file without using pip install

Long story short my work computer has network constraints which means trying to use pip install in cmd just leads to timing out/not finding package errors. For example; when I try to pip install ...
yenoolnairb's user avatar
  • 1,613
142 votes
7 answers
213k views

How to import classes defined in __init__.py

I am trying to organize some modules for my own use. I have something like this: lib/ __init__.py settings.py foo/ __init__.py someobject.py bar/ __init__.py somethingelse.py ...
scottm's user avatar
  • 28.2k
138 votes
5 answers
184k views

How to install a node.js module without using npm?

There are quite a few modules which are listed on node's github page but are not published with the npm-registry. These modules can't be installed using npm. What is the correct way to install these ...
vivekian2's user avatar
  • 3,904
138 votes
5 answers
59k views

Why #egg=foo when pip-installing from git repo

When I do a "pip install -e ..." to install from a git repo, I have to specify #egg=somename or pip complains. For example: pip install -e git://github.com/hiidef/oauth2app.git#egg=oauth2app What's ...
Lorin Hochstein's user avatar
137 votes
12 answers
167k views

Is there a standard way to list names of Python modules in a package?

Is there a straightforward way to list the names of all modules in a package, without using __all__? For example, given this package: /testpkg /testpkg/__init__.py /testpkg/modulea.py /testpkg/...
DNS's user avatar
  • 37.9k
137 votes
9 answers
50k views

#import using angle brackets < > and quote marks " "

I'm wondering what decides whether you're allowed to use <Header.h> or "Header.h" when you're importing files in Objective-C. So far my observation has been that you use the quote marks "" for ...
quano's user avatar
  • 19k
135 votes
7 answers
113k views

List all the modules that are part of a python package?

Is there a straightforward way to find all the modules that are part of a python package? I've found this old discussion, which is not really conclusive, but I'd love to have a definite answer before ...
static_rtti's user avatar
  • 55.2k
134 votes
13 answers
48k views

How to automatically install Emacs packages by specifying a list of package names?

I am using package to manage my Emacs extensions. In order to synchronize my Emacs settings on different computers, I'd like a way to specify a list of package names in .emacs file and then package ...
RNA's user avatar
  • 151k
133 votes
4 answers
128k views

Whats the difference between a module and a library in Python?

I have background in Java and I am new to Python. I want to make sure I understand correctly Python terminology before I go ahead. My understanding of a module is: a script which can be imported by ...
joker's user avatar
  • 2,073
132 votes
16 answers
123k views

How to change package name of Android Project in Eclipse?

I have an Android project created in Eclipse. I want to modify the package name and application of the project. How do I do that in Eclipse?
Dheepak's user avatar
  • 1,381
131 votes
6 answers
91k views

How can I update bower.json with installed packages?

In my project I've installed Bower components without the save option. Now, I would like update to bower.json. How can I update bower.json with installed packages?
kongaraju's user avatar
  • 9,532
131 votes
6 answers
79k views

Where does SDKMAN install packages?

I used SDKMAN! to install Groovy which went fine. Where is the installed package now? I need the path for it. I am on Ubuntu 14.04.
Med Tumy's user avatar
  • 1,765
129 votes
3 answers
210k views

Python: importing a sub‑package or sub‑module

Having already use flat packages, I was not expecting the issue I encountered with nested packages. Here is… Directory layout dir | +-- test.py | +-- package | +-- __init__.py |...
Hibou57's user avatar
  • 7,030
128 votes
9 answers
186k views

The import android.support cannot be resolved

I am trying to run the code provided HERE I downloaded the code from their Github and imported into Android SDK, but it shows error at the lines import android.support.v4.app.FragmentActivity; ...
user13267's user avatar
  • 7,145
127 votes
13 answers
170k views

What is the most compatible way to install python modules on a Mac?

I'm starting to learn python and loving it. I work on a Mac mainly as well as Linux. I'm finding that on Linux (Ubuntu 9.04 mostly) when I install a python module using apt-get it works fine. I can ...
GloryFish's user avatar
  • 13.3k
126 votes
3 answers
63k views

Do you put Babel and Webpack in devDependencies or Dependencies?

I'm new to npm and don't really understand what should go into dependencies vs. devDependencies. I know that for testing libraries they should go into dev, but how about for things like babel and ...
stackjlei's user avatar
  • 9,865