Skip to content

Instantly share code, notes, and snippets.

@takurx
Created October 23, 2023 22:08
Show Gist options
  • Save takurx/d00961808f620b370e0510cceb7a37fe to your computer and use it in GitHub Desktop.
Save takurx/d00961808f620b370e0510cceb7a37fe to your computer and use it in GitHub Desktop.
log, test apischema #2

Log

retry on Ubuntu 22.04

chino@chino-ThinkPad-E495:~/Works/hibimemo2/sikulix$ python -V
Python 3.10.12
chino@chino-ThinkPad-E495:~/Works/hibimemo2/sikulix$ pip install apischema
Command 'pip' not found, but can be installed with:
sudo apt install python3-pip
chino@chino-ThinkPad-E495:~/Works/hibimemo2/sikulix$ sudo apt install python3-pip
[sudo] password for chino: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  python3-wheel
The following NEW packages will be installed:
  python3-pip python3-wheel
0 upgraded, 2 newly installed, 0 to remove and 507 not upgraded.
Need to get 1,337 kB of archives.
After this operation, 7,176 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://jp.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-wheel all 0.37.1-2ubuntu0.22.04.1 [32.0 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-pip all 22.0.2+dfsg-1ubuntu0.3 [1,305 kB]
Fetched 1,337 kB in 2s (568 kB/s)        
Selecting previously unselected package python3-wheel.
(Reading database ... 288136 files and directories currently installed.)
Preparing to unpack .../python3-wheel_0.37.1-2ubuntu0.22.04.1_all.deb ...
Unpacking python3-wheel (0.37.1-2ubuntu0.22.04.1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../python3-pip_22.0.2+dfsg-1ubuntu0.3_all.deb ...
Unpacking python3-pip (22.0.2+dfsg-1ubuntu0.3) ...
Setting up python3-wheel (0.37.1-2ubuntu0.22.04.1) ...
Setting up python3-pip (22.0.2+dfsg-1ubuntu0.3) ...
Processing triggers for man-db (2.10.2-1) ...
chino@chino-ThinkPad-E495:~/Works/hibimemo2/sikulix$ cd ~
chino@chino-ThinkPad-E495:~$ cd LoRaWorks/
chino@chino-ThinkPad-E495:~/LoRaWorks$ ls
example_apischema.py
chino@chino-ThinkPad-E495:~/LoRaWorks$ python example_apischema.py 
Traceback (most recent call last):
  File "/home/chino/LoRaWorks/example_apischema.py", line 6, in <module>
    from graphql import print_schema
ModuleNotFoundError: No module named 'graphql'
chino@chino-ThinkPad-E495:~/LoRaWorks$ pip install ariadne
Defaulting to user installation because normal site-packages is not writeable
Collecting ariadne
  Downloading ariadne-0.20.1-py2.py3-none-any.whl (102 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.3/102.3 KB 1.6 MB/s eta 0:00:00
Collecting graphql-core<3.3,>=3.2.0
  Downloading graphql_core-3.2.3-py3-none-any.whl (202 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.9/202.9 KB 7.0 MB/s eta 0:00:00
Collecting typing-extensions>=3.6.0
  Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Collecting starlette<1.0,>0.17
  Downloading starlette-0.31.1-py3-none-any.whl (69 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.9/69.9 KB 15.6 MB/s eta 0:00:00
Collecting anyio<5,>=3.4.0
  Downloading anyio-4.0.0-py3-none-any.whl (83 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.1/83.1 KB 19.4 MB/s eta 0:00:00
Collecting sniffio>=1.1
  Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)
Requirement already satisfied: idna>=2.8 in /usr/lib/python3/dist-packages (from anyio<5,>=3.4.0->starlette<1.0,>0.17->ariadne) (3.3)
Collecting exceptiongroup>=1.0.2
  Downloading exceptiongroup-1.1.3-py3-none-any.whl (14 kB)
Installing collected packages: typing-extensions, sniffio, graphql-core, exceptiongroup, anyio, starlette, ariadne
Successfully installed anyio-4.0.0 ariadne-0.20.1 exceptiongroup-1.1.3 graphql-core-3.2.3 sniffio-1.3.0 starlette-0.31.1 typing-extensions-4.8.0
chino@chino-ThinkPad-E495:~/LoRaWorks$ python example_apischema.py 
Traceback (most recent call last):
  File "/home/chino/LoRaWorks/example_apischema.py", line 8, in <module>
    from apischema import ValidationError, deserialize, serialize
ModuleNotFoundError: No module named 'apischema'
chino@chino-ThinkPad-E495:~/LoRaWorks$ pip install apischema
Defaulting to user installation because normal site-packages is not writeable
Collecting apischema
  Downloading apischema-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 6.4 MB/s eta 0:00:00
Installing collected packages: apischema
Successfully installed apischema-0.18.1
chino@chino-ThinkPad-E495:~/LoRaWorks$ python example_apischema.py 
chino@chino-ThinkPad-E495:~/LoRaWorks$ ls
example_apischema.py
chino@chino-ThinkPad-E495:~/LoRaWorks$ pip install apischema[examples]
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: apischema[examples] in /home/chino/.local/lib/python3.10/site-packages (0.18.1)
Collecting bson
  Downloading bson-0.5.10.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: graphql-core>=3.0.0 in /home/chino/.local/lib/python3.10/site-packages (from apischema[examples]) (3.2.3)
Collecting docstring-parser
  Downloading docstring_parser-0.15-py3-none-any.whl (36 kB)
Collecting orjson
  Downloading orjson-3.9.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 138.7/138.7 KB 5.7 MB/s eta 0:00:00
Collecting pydantic
  Downloading pydantic-2.4.2-py3-none-any.whl (395 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 395.8/395.8 KB 10.8 MB/s eta 0:00:00
Requirement already satisfied: attrs in /usr/lib/python3/dist-packages (from apischema[examples]) (21.2.0)
Requirement already satisfied: pytest in /usr/lib/python3/dist-packages (from apischema[examples]) (6.2.5)
Collecting sqlalchemy
  Downloading SQLAlchemy-2.0.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 22.5 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.4.0 in /usr/lib/python3/dist-packages (from bson->apischema[examples]) (2.8.1)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from bson->apischema[examples]) (1.16.0)
Collecting annotated-types>=0.4.0
  Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)
Collecting pydantic-core==2.10.1
  Downloading pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 22.4 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions>=4.6.1 in /home/chino/.local/lib/python3.10/site-packages (from pydantic->apischema[examples]) (4.8.0)
Collecting greenlet!=0.4.17
  Downloading greenlet-3.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (612 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 612.9/612.9 KB 53.2 MB/s eta 0:00:00
Building wheels for collected packages: bson
  Building wheel for bson (setup.py) ... done
  Created wheel for bson: filename=bson-0.5.10-py3-none-any.whl size=11979 sha256=f1ed5c51c4afa41896cf3a2a9140290d1623ed49e39859d8324f72feb60b9289
  Stored in directory: /home/chino/.cache/pip/wheels/36/49/3b/8b33954dfae7a176009c4d721a45af56c8a9c1cdc3ee947945
Successfully built bson
Installing collected packages: pydantic-core, orjson, greenlet, docstring-parser, bson, annotated-types, sqlalchemy, pydantic
Successfully installed annotated-types-0.6.0 bson-0.5.10 docstring-parser-0.15 greenlet-3.0.0 orjson-3.9.9 pydantic-2.4.2 pydantic-core-2.10.1 sqlalchemy-2.0.22
chino@chino-ThinkPad-E495:~/LoRaWorks$ python example_sqlalchemy.py 
/home/chino/LoRaWorks/example_sqlalchemy.py:34: MovedIn20Warning: The ``as_declarative()`` function is now available as sqlalchemy.orm.as_declarative() (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
  @as_declarative()
chino@chino-ThinkPad-E495:~/LoRaWorks$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment