Category : package

I have a python package with the following directory structure: scripts | — test.py test2.py MyPackage | — __init__.py — MyModule | — __init__.py — MyScript.py and I’m trying to import MyPackage in test.py with import MyPackage and running the script with python scripts/test.py but I am giving the following error ModuleNotFoundError: No module named ..

Read more

I am working with payment gateway. I am trying to install a package pip install sslcommerz-python But command prompt shows me this (venv) C:UsersITSDesktopmy-e-com-projectvenvScripts>pip install sslcommerz-python Collecting sslcommerz-python Using cached sslcommerz-python-0.0.7.tar.gz (4.1 kB) Requirement already satisfied: astroid==2.3.3 in c:usersitsdesktopmy-e-com-projectvenvlibsite-packages (from sslcommerz-python) (2.3.3) Requirement already satisfied: certifi==2019.11.28 in c:usersitsdesktopmy-e-com-projectvenvlibsite-packages (from sslcommerz-python) (2019.11.28) Requirement already satisfied: chardet==3.0.4 ..

Read more

Object is to install python package ‘opensky-api’ from https://github.com/openskynetwork/opensky-api Used following command at Anaconda prompt. Logging in with my github username and my token What mistake is in my command line? command line (base) C:Usersrsrcopensky> pip install git+https://github.com/openskynetwork/opensky.git#egg=opensky error message Collecting opensky Cloning https://github.com/openskynetwork/opensky.git to c:usersappdatalocaltemppip-install-ovtrt2xbopensky_9457d92114a54f67b0ed1a53e5ac76c2 Running command git clone –filter=blob:none -q https://github.com/openskynetwork/opensky.git ‘C:UsersAppDataLocalTemppip-install-ovtrt2xbopensky_9457d92114a54f67b0ed1a53e5ac76c2’ Logon ..

Read more

Is there any case (testing or whatever etc…) or usefulness to have a folder containing python files without the init.py file? i.e: project/ run.py package1/ file1.py file2.py instead of: project/ run.py package1/ __init__.py file1.py file2.py I ask this because I have seen some projects with folders (that contain python files) with and without the init.py ..

Read more

I created a python package using poetry. I have included a cli tool and configured it (which is comparable to setuptools), So that after installation my script is located on /Users/user/Library/Python/3.8/bin/my-script However this folder /Users/user/Library/Python/3.8/bin is not in my path and i get a warning about it WARNING: The script my-script is installed in "…path" ..

Read more

I am designing a Website with Flask and the current structure is the following: app.py python_code/ gen_classes/ __init__.py databasehandler.py timeparser.py webserver/ __init__.py routes.py forms.py In e.g forms.py I access timeparser.py with: from python_code.gen_classes.timeparser import TimeParser When I run app.py it is no problem because python_code is a known module. Now I want to implement unittests ..

Read more