Skip to content
Advertisement

Tag: package

ImportError in test files

I’ve seen a lot of questions that are similar to this but none of the solutions have worked for me. I’m getting an import error when trying to run pytest on a test package I’m developing to teach myself how to create python packages. Currently I have a python package that looks like and my test_module_a.py contains Running the command

Install conan package without requirements?

Is there a possibility to install a conan package without requirements? I build a metapackage, which only contains some configurations and depends on other binary packages in the requires section. Now I want to access only the configurations w/out downloading all dependencies, Is there a possibility to do so? conan download downloads a package, but won’t install it, e.g. there

How to instal Python packages for Spyder

I am using the IDE called Spyder for learning Python. I would like to know in how to go about in installing Python packages for Spyder? Answer step 1. First open Spyder and click Tools –> Open command prompt. For more details click visit this link, https://miamioh.instructure.com/courses/38817/pages/downloading-and-installing-packages

Python package names collision

I have a following project structure: when I run python program_name from top level directory I get an error. It appears, that some of mine dependencies import the package with the same name as mine. Namely I import numpy in __main__.py and, somewhere deep inside, it has import package_name line. So instead of importing its dependency it import my package.

How can I import subpackage?

I have a file structure like this: Dir2.__init__.py have has the same code, but with .Something2 Something.py has simple add method, Something2.py has simple sub method. What I need: But I get an error AttributeError: module ‘Dir1’ has no attribute ‘Dir2’. If I use from .Dir2 import * in Dir1.__init__.py code in test.py works, but also works print(Dir1.sub(10, 14)), what

Why does pip install not work for catboost?

I have to install catboost but can not make it by pip install catboost. There is not catboost library in Anaconda, so pip in the one way. The error message is: Python version is 3.6.3. Screenshot of error: error message I’ve tried : and None of these works. Why does this problem appeared and is there another way to install

Python – package not found although it is installed

I have the following version of python I installed a package with the following command pip install wfdb It is succesfully installed because when I then write the command: pip show wfdb The following information appears Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages However, when I type the command import wfdb in Python notebook or the version of python in terminal, I get the following

Advertisement