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
3792 votes
14 answers
2.5m views

What is __init__.py for?

What is __init__.py for in a Python source directory?
Mat's user avatar
  • 85.2k
3015 votes
32 answers
2.2m views

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 <package-name> This prints a cryptic error: npm version <package-name> ...
Laurent Couvidou's user avatar
1268 votes
18 answers
513k views

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 --...
nfort's user avatar
  • 12.8k
1044 votes
19 answers
773k views

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 ...
lolski's user avatar
  • 17k
949 votes
5 answers
470k views

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..'s user avatar
  • 11.2k
876 votes
10 answers
1.2m views

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 ...
orome's user avatar
  • 47.6k
850 votes
10 answers
358k views

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's user avatar
  • 9,283
842 votes
23 answers
664k views

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 ...
skytreader's user avatar
  • 11.6k
782 votes
8 answers
578k views

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 ...
Erel Segal-Halevi's user avatar
717 votes
13 answers
553k views

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 ...
ire_and_curses's user avatar
716 votes
19 answers
1.0m views

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 ...
Richie Cotton's user avatar
699 votes
23 answers
2.0m views

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's user avatar
  • 91.3k
697 votes
4 answers
375k views

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 ...
Bialecki's user avatar
  • 30.7k
679 votes
11 answers
571k views

Installing a local module using npm?

I have a downloaded module repo, I want to install it locally, not globally in another directory? What is an easy way to do this?
fancy's user avatar
  • 50.6k
675 votes
12 answers
576k views

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 ...
Ari B. Friedman's user avatar
672 votes
8 answers
174k views

What is the difference between require() and library()?

What is the difference between require() and library()?
Marco's user avatar
  • 9,564
652 votes
30 answers
528k views

Can you find all classes in a package using reflection?

Is it possible to find all classes or interfaces in a given package? (Quickly looking at e.g. Package, it would seem like no.)
Jonik's user avatar
  • 81.2k
595 votes
15 answers
708k views

beyond top level package error in relative import [duplicate]

It seems there are already quite some questions here about relative import in python 3, but after going through many of them I still didn't find the answer for my issue. so here is the question. I ...
shelper's user avatar
  • 10.4k
575 votes
13 answers
687k views

How to find out which package version is loaded in R?

I am in a process of figuring out how to use my university cluster. It has 2 versions of R installed. System wide R 2.11 (Debian 6.0) and R 2.14.2 in non-standard location. I am trying to use MPI ...
mpiktas's user avatar
  • 11.5k
544 votes
6 answers
262k views

What is the convention for word separator in Java package names?

How should one separate words in package names? Which of the following are correct? com.stackoverflow.my_package (Snake Case using underscore) com.stackoverflow.my-package (Kebab Case using hyphens) ...
Jigar's user avatar
  • 9,271
526 votes
16 answers
1.0m views

How to clean node_modules folder of packages that are not in package.json?

Assume I install project packages with npm install that looks into package.json for modules to be installed. After a while I see that I don't need some specific module and remove its dependency from ...
Sergei Basharov's user avatar
477 votes
8 answers
299k views

javax vs java package

What's the rationale behind the javax package? What goes into java and what into javax? I know a lot of enterprise-y packages are in javax, but so is Swing, the new date and time api (JSR-310) and ...
Jaka Jančar's user avatar
  • 11.5k
451 votes
35 answers
256k views

Elegant way to check for missing packages and install them?

I seem to be sharing a lot of code with coauthors these days. Many of them are novice/intermediate R users and don't realize that they have to install packages they don't already have. Is there an ...
Maiasaura's user avatar
  • 32.7k
447 votes
24 answers
1.0m views

Python 3: ImportError "No Module named Setuptools"

I'm having troubles with installing packages in Python 3. I have always installed packages with setup.py install. But now, when I try to install the ansicolors package I get: importerror "No ...
user1994934's user avatar
  • 4,473
438 votes
16 answers
484k views

How to get package name from anywhere?

I am aware of the availability of Context.getApplicationContext() and View.getContext(), through which I can actually call Context.getPackageName() to retrieve the package name of an application. ...
ef2011's user avatar
  • 10.6k
438 votes
19 answers
1.1m views

Relative imports - ModuleNotFoundError: No module named x

This is the first time I've really sat down and tried python 3, and seem to be failing miserably. I have the following two files: test.py config.py config.py has a few functions defined in it as ...
blitzmann's user avatar
  • 7,645
433 votes
3 answers
293k views

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 ...
Philip's user avatar
  • 7,283
426 votes
5 answers
206k views

Is __init__.py not required for packages in Python 3.3+

I am using Python 3.5.1. I read the document and the package section here: https://docs.python.org/3/tutorial/modules.html#packages Now, I have the following structure: /home/wujek/Playground/a/b/...
wujek's user avatar
  • 10.7k
407 votes
32 answers
1.2m views

"pip install unroll": "python setup.py egg_info" failed with error code 1

I'm trying to install some packages with pip. But pip install unroll gives me Command "python setup.py egg_info" failed with error code 1 in C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-...
benjaminh's user avatar
  • 4,079
389 votes
16 answers
275k views

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 ...
futlib's user avatar
  • 8,368
388 votes
12 answers
240k views

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 │   ├...
zachwill's user avatar
  • 4,593
381 votes
6 answers
210k views

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 ['...
Charles Brunet's user avatar
344 votes
13 answers
855k views

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 ...
thompson's user avatar
  • 3,459
321 votes
10 answers
301k views

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's user avatar
  • 41.2k
306 votes
34 answers
1.8m views

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: ...
Jonathan Lam's user avatar
  • 17.3k
290 votes
8 answers
218k views

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's user avatar
  • 5,090
281 votes
4 answers
334k views

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 ...
Milktrader's user avatar
  • 9,708
265 votes
17 answers
297k views

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 ...
abhiomkar's user avatar
  • 4,808
252 votes
7 answers
148k views

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 ...
ronszon's user avatar
  • 3,237
246 votes
3 answers
215k views

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 ...
Marten Bauer's user avatar
  • 2,463
238 votes
11 answers
335k views

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 --- ...
Jim Johnson's user avatar
  • 2,589
235 votes
10 answers
149k views

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 ...
Tyler Rinker's user avatar
233 votes
10 answers
123k views

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 ...
alexandernst's user avatar
  • 14.8k
232 votes
7 answers
173k views

Are there best practices for (Java) package organization? [closed]

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 ...
Cyntech's user avatar
  • 5,532
227 votes
16 answers
949k views

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 ...
Hareez Rana's user avatar
  • 2,283
225 votes
9 answers
135k views

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 ...
Neil's user avatar
  • 9,313
222 votes
10 answers
331k views

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 └...
user avatar
221 votes
15 answers
142k views

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 ...
arielorvits's user avatar
  • 5,435
215 votes
20 answers
518k views

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's user avatar
  • 6,349
211 votes
3 answers
66k views

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's user avatar
  • 138k

1
2 3 4 5
343