Skip to content
Advertisement

Tag: package

Imported package searches for modules in my code

Can someone explain me what is going on here and how to prevent this? I have a main.py with the following code: I outsourced some functions into a module named utils.py: When I run this I get the following output: So it seems like the torch package I imported has also a utils resource (package) and searches for a module

How to migrate all packages, settings, user data etc. after updating to a newer Python version?

I’ve just installed Python 3.10 on Windows 10 and none of my scripts are working. For instance, when doing jupyter notebook I get I’ve been using Python 3.9 and all the scripts are still located in C:Program FilesPython39Scripts. However, there is nothing in C:Program FilesPython310Scripts (besides pip). As a first attempt to solve the problem, I uninstalled Python 3.10 leaving

How to install the package scikit-geometry?

I am trying to compute a class of Minkowski sums for some mathematical work, but there are too many to do by hand in a reasonable amount of time. I found this documentation for a package called scikit-geometry, but when I write import skgeom as sg as in the examples in the documentation, VSCode can’t find the module. The documentation

Including External Python Packages with Python Executable

I have made my own Executable from a python script which I want to run on a computer that does not have Python installed on it. My only problem is there are packages I have included which are not default python packages (e.g. pynput). Otherwise, the Executable would run fine without Python installed. Is there a way to include Python

Python Package Creation

I have a package i am trying to create. The directory hierarchy looks like this. I have some other file main.py that is not in the package and inside I have put The output from this is however I was expecting to see “Part1”, “Part2”, and “Part3” in this list. I also tried and I got an attribute error: 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 […]

Advertisement