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
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 ...
CptSupermrkt's user avatar
  • 6,994
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 ...
Petr Razumov's user avatar
  • 2,062
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 <...
André Betz's user avatar
  • 1,451
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 ...
Daniel Hepper's user avatar
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....
tflutre's user avatar
  • 3,496
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 ...
Gopikrishna S's user avatar
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 ...
La bla bla's user avatar
  • 8,668
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; ...
Nick Heiner's user avatar
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', ...
Honza Javorek's user avatar
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) ...
Richie Cotton's user avatar
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 ...
Erik's user avatar
  • 1,684
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", ...
joaoricardo000's user avatar
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 ...
Gulbahar's user avatar
  • 5,493
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 ...
Andrew's user avatar
  • 4,248
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 ...
Mohamed Taboubi's user avatar
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 ...
Undistraction's user avatar
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 ...
Android developer's user avatar
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 ...
kctang's user avatar
  • 11.1k
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 ...
989's user avatar
  • 12.8k
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 ...
Brian Sullivan's user avatar
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?
Dheeraj Joshi's user avatar
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 ...
Tim Visher's user avatar
  • 12.8k
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 ...
matchifang's user avatar
  • 5,380
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-...
sergserg's user avatar
  • 22k
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?
maček's user avatar
  • 77.5k
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
icn's user avatar
  • 17.6k
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?
Charles Brunet's user avatar
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 ...
HenryNguyen's user avatar
  • 1,153
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 ...
gxc's user avatar
  • 5,098
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 ...
Niels Bom's user avatar
  • 9,201
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 ...
conorsch's user avatar
  • 1,456
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 ...
Mrinmoy's user avatar
  • 1,629
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 ...
Sunil Shah's user avatar
  • 1,050
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. ...
Michael's user avatar
  • 1,697
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 ...
alecxe's user avatar
  • 470k
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","...
user2946746's user avatar
  • 1,760
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?
ntimes's user avatar
  • 1,279
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?
Breako Breako's user avatar
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 ...
SteveO7's user avatar
  • 2,450
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....
Oleksii Kolotylenko's user avatar
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 ...
Paul Gowder's user avatar
  • 2,519
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 ...
RockScience's user avatar
  • 18.3k
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" ...
ThisIsErico's user avatar
  • 1,997
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 ...
Basel Akasha's user avatar
  • 1,228
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 ...
Ari B. Friedman's user avatar
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 ...
Richie Cotton's user avatar
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 ...
Jean V. Adams's user avatar
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 ...
Andrew Davey's user avatar
  • 5,421
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(), ...
Tal Galili's user avatar
  • 25.1k
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 ...
assignment_operator's user avatar