AttributeError: module 'python_example' has no attribute 'add'
631068264 opened this issue · 0 comments
631068264 commented
Follow the REMEADME.md to do . Not work
正克隆到 'python_example'...
remote: Enumerating objects: 663, done.
remote: Counting objects: 100% (233/233), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 663 (delta 185), reused 191 (delta 173), pack-reused 430 (from 1)
接收对象中: 100% (663/663), 136.64 KiB | 608.00 KiB/s, 完成.
处理 delta 中: 100% (403/403), 完成.
(.venv) ➜ tensorRT_Pro git:(main) ✗ pip install python_example
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/, https://mirrors.aliyun.com/pypi/simple/, https://pypi.python.org/simple/
Collecting python_example
Downloading python_example-0.0.1.tar.gz (1.2 kB)
Preparing metadata (setup.py) ... done
Collecting django (from python_example)
Downloading Django-5.1.5-py3-none-any.whl.metadata (4.2 kB)
Collecting asgiref<4,>=3.8.1 (from django->python_example)
Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)
Collecting sqlparse>=0.3.1 (from django->python_example)
Downloading sqlparse-0.5.3-py3-none-any.whl.metadata (3.9 kB)
Downloading Django-5.1.5-py3-none-any.whl (8.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 2.4 MB/s eta 0:00:00
Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)
Downloading sqlparse-0.5.3-py3-none-any.whl (44 kB)
Building wheels for collected packages: python_example
Building wheel for python_example (setup.py) ... done
Created wheel for python_example: filename=python_example-0.0.1-py3-none-any.whl size=1135 sha256=ef1dad0d1722fc18b879daf412e3488320f09566394bbff919afbc71b268c3de
Stored in directory: /Users/wyx/Library/Caches/pip/wheels/34/96/46/34165185f761948297a7e0539208a5eac661e0f5edc1b624bc
Successfully built python_example
Installing collected packages: sqlparse, asgiref, django, python_example
Successfully installed asgiref-3.8.1 django-5.1.5 python_example-0.0.1 sqlparse-0.5.3
(.venv) ➜ tensorRT_Pro git:(main) ✗ import python_example
python_example.add(1, 2)
^C
(.venv) ➜ tensorRT_Pro git:(main) ✗ python 3
/usr/local/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/wyx/project/tensorRT_Pro/3': [Errno 2] No such file or directory
(.venv) ➜ tensorRT_Pro git:(main) ✗ python
Python 3.11.10 (main, Sep 7 2024, 01:03:31) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import python_example
>>> python_example.add(1, 2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'python_example' has no attribute 'add'
>>>