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
Tag: package
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
Sibling package import and mypy “has no attribute” error
I am trying to import a module from a sibling package in Python; following the instructions in this answer. My problem is that the import works… but mypy is saying that it’s a bad import. I’m seeking to understand why mypy is reporting an error, and how to fix it. Directory structure/Code This is a module that I have installed
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
Error installing the linearmodels package on Jupyter notebook
I am trying to install the linearmodels package on Jupyter notebook using the following code: but I am getting the following error message: Can you anyone please help me with this? After installing the linearmodels package I’ll be importing a two-stage instrumental variables regression: Answer To install packages for Jupyter notebooks there are a couple of ways of approaching it.
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 well as a few variables. I’ve stripped it down to the following: config.py test.py I also have an __init__.py However, I’m getting the following