packages

Package imports error on devtools::check()

巧了我就是萌 提交于 2019-12-30 06:23:11
问题 I have a package that contains the following package Imports in the DESCRIPTION file: Imports: lubridate, assertthat, R6, stringr I don't import these into my package's NAMESPACE using an import(pkgname) or importFrom(pkgname, fn) commands. Rather I refer to these package's functions in my R code using a fully qualified call. Based on my reading of R-ext, this is permissible: The ‘Imports’ field lists packages whose namespaces are imported from (as specified in the NAMESPACE file) but which

In setup.py or pip requirements file, how to control order of installing package dependencies?

末鹿安然 提交于 2019-12-30 04:11:07
问题 I've got a Python package with its setup.py having dependencies declared via the usual way, in install_requires=[...]. One of the packages there, scikits.timeseries, has a setup.py expecting numpy to already be installed, thus, I'd like some way to have numpy installed first. For this case and in general, can the order of dependency installation be controlled? How? Currently the order in which setup.py pulls down dependencies (as listed in the arg install_requires) seems practically random.

Difference between Package and Directory in Java

﹥>﹥吖頭↗ 提交于 2019-12-29 19:18:18
问题 In a Java Project , does keeping all the .java files in the same folder mean they are in the same package? What is the difference in making a Package for our project compared to keeping all the project files in one folder? This thread doesn't really address my question. 回答1: There is a relationship between package and directory, but it's one that you must maintain. If you have a class that's in "mypackage1.mypackage2", that means that the java command is going to expect to find it in a

Difference between Package and Directory in Java

*爱你&永不变心* 提交于 2019-12-29 19:17:31
问题 In a Java Project , does keeping all the .java files in the same folder mean they are in the same package? What is the difference in making a Package for our project compared to keeping all the project files in one folder? This thread doesn't really address my question. 回答1: There is a relationship between package and directory, but it's one that you must maintain. If you have a class that's in "mypackage1.mypackage2", that means that the java command is going to expect to find it in a

R CMD check not looking for gcc in Rtools directory

被刻印的时光 ゝ 提交于 2019-12-29 09:25:11
问题 R has been installing packages just fine, but suddenly – I can't think of anything relevant that I modified or uninstalled – it can't find gcc when I run R CMD check in the command prompt, or devtools::check() in the R console; it delivers the following error: * installing *source* package 'PkgName' ... ** libs C:/MinGW/bin/gcc -I"C:/PROGRA~1/R/R-34~1.2/include" -DNDEBUG -I"d:/Compiler/gcc-4.9.3/local330/include" -O3 -Wall -std=gnu99 -mtune=core2 -c PkgName-init.c -o PkgName-init.o C:/MinGW

Python can't find my module

拟墨画扇 提交于 2019-12-29 03:02:48
问题 I have a python project (which I run within a virtualenv) and that has the following structure: Project ├───.git ├───venv └───src ├───__init__.py ├───mymodules │ ├───__init__.py │ ├───module1.py │ └───module2.py └───scripts ├───__init__.py └───script.py script.py import src.mymodules.module1 ... I run the project with venv activated and from the Project directory using the following command: (venv)$ python src/scripts/script.py The script runs but gives out the following error before exiting:

Package and visibility

*爱你&永不变心* 提交于 2019-12-29 00:59:25
问题 I'm making an SDK and I'm trying to separate classes to different packages, those classes use some other shared classes. The issue is if I made the shared classes public everyone will be able to see them, not only my classes. What's the right way to make them only accessible by my application? Example : Package a MyClass1 Package b MyClass2 Package c public MySharedClass Because c is public MySharedClass will be able to access it, but the issue is that it will also will be visible to the

Is it possible to use two Python packages with the same name?

房东的猫 提交于 2019-12-28 20:36:13
问题 I have a question about imports. The question might seem a bit contrived, but its purpose is to explore the limitations of using absolute imports for all imports in a package. PEP8 highly discourages relative imports (edit: and the Google Python Style Guide says never to use them). Say you are given two large-ish packages that both have the same name and that both use absolute imports in accordance with PEP8: /pkg1 mod1.py (contains an absolute import: 'import pkg1.mod2') mod2.py ... /pkg1

Package (Python PIL/Pillow) installed but I can't import it

我怕爱的太早我们不能终老 提交于 2019-12-28 16:07:05
问题 I've been using python for simple data processing scripts, but now I want to do some image processing and I encountered a problem. Importing the pillow module doesn't seem to work. I found a simple script here to check what packages are installed and I found it, but importing it doesn't seem to work. Here's the code I'm trying to run: import pip installed_packages = pip.get_installed_distributions() installed_packages_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_packages])

Install python packages on OpenShift

痞子三分冷 提交于 2019-12-28 06:47:14
问题 I'm trying to install python packages on OpenShift but I see a dearth of pages about the best way to do this. Can someone please suggest the best way of getting on say oauth2 and simplejson . I've tried including these in the setup.py , but I have no idea whether these are actually available or I'll have to upload and point to the path. How can I do this? 回答1: Did you install rhc (made by OpenShift.com) ? If not then see on OpenShift.com: Installing OpenShift RHC Client Tools Now you can