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
17,100
questions
124
votes
6
answers
164k
views
Python: import module from another directory at the same level in project hierarchy
I've seen all sorts of examples and other similar questions, but I can't seem to find an example that exactly matches my scenario. I feel like a total goon asking this because there are so many ...
119
votes
2
answers
128k
views
How to build executable with name other than Golang package
Is it possible to build (install, go get, etc) an executable with the name foobar if my Golang package name is one of the following:
github.com/username/go-foobar
github.com/username/foobar-tools
...
117
votes
6
answers
52k
views
pip install . creates only the dist-info not the package
I am trying to make a python package which I want to install using pip install . locally. The package name is listed in pip freeze but import <package> results in an error No module named <...
115
votes
3
answers
80k
views
Absolute vs. explicit relative import of Python module
I'm wondering about the preferred way to import packages in a Python application. I have a package structure like this:
project.app1.models
project.app1.views
project.app2.models
project.app1.views ...
112
votes
6
answers
141k
views
R install.packages returns "failed to create lock directory"
I get this error when downloading the Rcpp package:
> install.packages("Rcpp", dependencies=TRUE)
Installing package(s) into ‘/home/me/src/Rlibs’ (as ‘lib’ is unspecified)
trying URL 'http://cran....
111
votes
3
answers
21k
views
What are `rc` files in nodejs?
I have some questions regarding various rc files in a typical node application, like .npmrc, .babelrc etc.
What is an rc file, I know its a runtime-config for the module, but anything else?
Does the ...
109
votes
4
answers
186k
views
How to get current class name including package name in Java?
I'm working on a project and one requirement is if the 2nd argument for the main method starts with “/” (for linux) it should consider it as an absolute path (not a problem), but if it doesn't start ...
108
votes
3
answers
123k
views
Java JUnit: The method X is ambiguous for type Y
I had some tests working fine. Then, I moved it to a different package, and am now getting errors. Here is the code:
import static org.junit.Assert.*;
import java.util.HashSet;
import java.util.Map;
...
108
votes
4
answers
44k
views
Difference between entry_points/console_scripts and scripts in setup.py?
There are basically two ways to install Python console scripts to my path by setup.py:
setup(
...
entry_points = {
'console_scripts': [
'foo = package.module:func',
...
107
votes
2
answers
250k
views
What does "The following object is masked from 'package:xxx'" mean?
When I load a package, I get a message stating that:
"The following object is masked from 'package:xxx'
For example, if I load testthat then assertive, I get the following:
library(testthat)
...
104
votes
4
answers
85k
views
Adding code to __init__.py
I'm taking a look at how the model system in django works and I noticed something that I don't understand.
I know that you create an empty __init__.py file to specify that the current directory is a ...
102
votes
5
answers
70k
views
How include static files to setuptools - python package
I want to include the ./static/data.txt to setuptools, here is my code:
# setup.py
import os,glob
from setuptools import setup,find_packages
setup(
name = "PotatoProject",
version = "0.1.1",
...
101
votes
7
answers
108k
views
Displaying information on non-installed RPM package?
I googled for this, but couldn't find how to query a non-installed RPM file for its information:
# rpm -qa blackfin-jtag-tools-09r1.1-2.i386.rpm
#
# rpm -qi blackfin-jtag-tools-09r1.1-2.i386.rpm
...
100
votes
6
answers
99k
views
How do I list the files inside a python wheel?
I'm poking around the various options to setup.py for including non-python files, and they're somewhat less than intuitive. I'd like to be able to check the package generated by bdist_wheel to see ...
99
votes
4
answers
91k
views
Naming conventions of composed package names
I want to create a package named form validator.
Is it better to write
form_validator,
formValidator or
formvalidator?
I want to mention that I want to avoid form.validator. And that form-validator ...
99
votes
4
answers
31k
views
Automatically Build NPM Module On Install From Github
Given that a project's lib/ dir shouldn't be checked into Git because the files it contains are derived files (from the build process). When installing a package from the project's github (during ...
96
votes
17
answers
165k
views
Package name does not correspond to the file path - IntelliJ
I'm trying to import a project from VCS (well, I'm doing it for the first time actually) and this is my (imported) project's structure:
BTW. this screen is made after many tries of changing these ...
96
votes
14
answers
72k
views
Should interfaces be placed in a separate package? [closed]
I'm new to a team working on a rather large project, with lots of components and dependencies. For every component, there's an interfaces package where the exposed interfaces for that component are ...
95
votes
6
answers
206k
views
Get the list of installed packages by user in R
How we can get the list of installed packages by user in R along with its version?
I know about the command installed.packages() which will give information about all packages (base or non-base). But ...
93
votes
16
answers
20k
views
Why do people use tarballs?
As a primarily Windows developer, perhaps I'm missing something cultural in the Linux community, but it has always confused me.
When downloading something that the files are first put into a .tar ...
93
votes
6
answers
32k
views
Do unused import and objects have a performance impact?
Do the unused imports and unused objects in Java code create any performance impact?
Suppose an object is initialized and never used, what happens?
And what is the cost of unused imports?
93
votes
15
answers
35k
views
What strategy do you use for package naming in Java projects and why? [closed]
I thought about this awhile ago and it recently resurfaced as my shop is doing its first real Java web app.
As an intro, I see two main package naming strategies. (To be clear, I'm not referring to ...
92
votes
12
answers
375k
views
Python: How to pip install opencv2 with specific version 2.4.9?
I know that I could pip install opencv-python which installs opencv3, but is there a separate command or name for opencv specific version such as 2.4.9?
If not, how can I specify which version to ...
92
votes
6
answers
105k
views
Non-declaration statement outside function body in Go
I'm building a Go library for an API that offers JSON or XML formatted data.
This API requires me to request a session_id every 15 minutes or so, and use that in calls. For example:
foo.com/api/[my-...
92
votes
2
answers
58k
views
How do I modify a Homebrew formula?
I installed ImageMagick via Homebrew.
However, due to a bug I have with my current configuration, I need to adjust the compile flags for the formula and reinstall it.
How can I accomplish this?
91
votes
3
answers
43k
views
How to publish nuget prerelease version package
I understand how to publish a nuget package using nuget command line
nuget command line
But I Have searched around I don't find docs about how to publish a nuget prerelease package
91
votes
3
answers
38k
views
How python deals with module and package having the same name?
Suppose I have a module foo.py and a package foo/. If I call
import foo
which one will be loaded? How can I specify I want to load the module, or the package?
90
votes
14
answers
150k
views
Eclipse: The declared package does not match the expected package
I have a problem importing an external project. I go File -> Import... -> Existing Projects into Workspace, choose the folder where the project is located and everything is imported - but the package ...
90
votes
3
answers
90k
views
Installing "global" npm dependencies via package.json [duplicate]
I have a few "global" dependencies (jshint, csslint, buster, etc..) that I'd like to have automatically installed and executable via the command line when my package is installed via npm install. Is ...
87
votes
5
answers
40k
views
How to get the list of options that Python was compiled with?
You can compile Python in various ways. I'd like to find out with which options my Python was compiled.
Concrete use-case: was my Python compiled with readline?
I know I can see this by doing "import ...
87
votes
5
answers
38k
views
What do the *-dev packages in the Linux package repositories actually contain?
My question is very basic, as is my knowledge right now.
I'm a long-time Linux user, but have only recently taken a major interest in programming. I see that many popular applications in the Ubuntu ...
87
votes
6
answers
69k
views
Java Package Vs Folder-Structure? what is the difference
I would like to know What are the difference between folder-structure and package used in Eclipse IDE for Java EE development.
When do we use which one and why?.
Whats should be the practice
...
86
votes
12
answers
188k
views
Unable to resolve dependency tree Reactjs
I am trying to install react-tinder-card in my current project. So I am trying to install the react-tinder-card but after I use the command
npm install --save react-tinder-card
All I can see in my ...
86
votes
3
answers
83k
views
How to install my own python module (package) via conda and watch its changes
I have a file mysql.py, which I use in almost all of my projects. Since I do not want to copy and paste the same file into each of these projects I wrote a module - possibly a package in the future.
...
84
votes
4
answers
26k
views
Check if requirements are up to date
I'm using pip requirements files for keeping my dependency list.
I also try to follow best practices for managing dependencies and provide precise package versions inside the requirements file. For ...
84
votes
3
answers
106k
views
How to install multiple packages?
How would I got about installing multiple packages in R?
I tried the following code:
install.packages("EIAdata", "gdata", "ggmap", "ggplot2","gridExtra","ISOweek","kobe","lubridate","maps","MASS","...
83
votes
7
answers
35k
views
Package(Plugin) Management for Vim
Emacs 24 looks like it will have a package manager. What package management options are there for Vim?
83
votes
8
answers
30k
views
Difference between a module and a package in Node.js?
I am new to Node.js. What is the difference between a "package" and a "module" in Node.js?
82
votes
2
answers
152k
views
Function to calculate geospatial distance between two points (lat,long) using R [duplicate]
I have geocoded points in long, lat format, and I want to calculate the distance between them using R. This seems pretty straight forward, yet I can't find a function that will do it easily. I've ...
81
votes
3
answers
52k
views
Why should java package name be lowercase?
Actually this is completely theoretic question. But it's interesting why java specification don't allow uppercase characters letters in package and cause write something like this:
com.mycompany....
80
votes
7
answers
77k
views
jupyter notebook running kernel in different env
I've gotten myself into some kind of horrible virtualenv mess. Help?!
I manage environments with conda. Until recently, I only had a python2 jupyter notebook kernel, but I decided to drag myself ...
80
votes
4
answers
81k
views
R: 2 functions with the same name in 2 different packages
I need to load to R packages : tseries and chron
Both have a function named is.weekend
I always have in my environment the function from the second package I loaded.
How can I access always the ...
79
votes
15
answers
167k
views
Go failing - expected 'package', found 'EOF'
I've been having a hard time trying to execute a simple golang program in a virtual machine powered by vagrant.
These are the relevant fields of my go env:
GOARCH="amd64"
GOPATH="/usr/local/src/go"
...
77
votes
9
answers
35k
views
How to upload new versions of project to PyPI with twine?
I've uploaded my Python package to PyPI.
But now I made new version of my package and need to upload it.
I tried to make same progress which I did when upload the package first time but I got the ...
77
votes
8
answers
15k
views
Diagnosing R package build warning: "LaTeX errors when creating PDF version"
When building a package, I received the following warning:
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
I have no idea ...
77
votes
3
answers
32k
views
How do you use multiple versions of the same R package?
In order to be able to compare two versions of a package, I need to able to choose which version of the package that I load. R's package system is set to by default to overwrite existing packages, so ...
77
votes
2
answers
10k
views
Create an R package that depends on another R package located on GitHub
I am creating an R package on GitHub, LW1949, that depends on another R package on GitHub, jvamisc. When I try to install LW1949 using
require(devtools)
devtools::install_github("user/LW1949")
I ...
76
votes
7
answers
55k
views
MSBuild target package not found
I want to package my VS2010 web application project ready for deployment with msdeploy. On development machine I can do this using:
MSBuild.exe "C:\path\to\WebApp.csproj" /target:package
But on my ...
75
votes
13
answers
85k
views
Windows 7, update.packages problem: "unable to move temporary installation"?
I am using R 2.13.0 with windows 7, after giving my user full privileges to the R folder (as described here).
This allows me to install new packages just fine.
However, when using update.packages(), ...
75
votes
1
answer
24k
views
Package vs Library
I've just started working with CMake and I noticed that they have both a find_package and a find_library. And this confuses me. Can somebody explain the difference between a package and a library in ...