Drinkhuahuaniu / INShuaKe

干部网络学院刷课
19 stars 3 forks source link

请教,为何运行出错呢? #6

Closed i-fengma closed 3 months ago

i-fengma commented 3 months ago

运行之前,先安装Chrome(版本 126.0.6478.127)。然后开始执行: 1、安装Miniconda3-latest-Windows-x86_64.exe 2、在 cmd 中执行: 1)conda create -n shuake python=3.11 2)conda activate shuake 3、进入源码目录:cd C:\Users\fengma\miniconda3\envs\INShuaKe-main,执行: 1)pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ 2)playwright install 4、执行:python main.py 但是出错。请教,是哪里的问题? (shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\fengma\miniconda3\envs\INShuaKe-main\main.py", line 2, in <module> from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

Drinkhuahuaniu commented 3 months ago

运行之前,先安装Chrome(版本 126.0.6478.127)。然后开始执行: 1、安装Miniconda3-latest-Windows-x86_64.exe 2、在 cmd 中执行: 1)conda create -n shuake python=3.11 2)conda activate shuake 3、进入源码目录:cd C:\Users\fengma\miniconda3\envs\INShuaKe-main,执行: 1)pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ 2)playwright install 4、执行:python main.py 但是出错。请教,是哪里的问题? (shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\fengma\miniconda3\envs\INShuaKe-main\main.py", line 2, in <module> from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

请你把你的目录截个图 以及你cmd运行后报错的截个图给我看看

i-fengma commented 3 months ago

### 1、这是目录的截图:

屏幕截图 2024-07-01 203122

### 2、这是CMD:

` (shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\fengma\miniconda3\envs\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

`

是哪里出的错呢?请指教。谢谢。

zekohung commented 3 months ago

我也遇到了相关问题,暂未解决 .

(shuake) C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main>python main.py
Traceback (most recent call last): File "C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

Drinkhuahuaniu commented 3 months ago

我也遇到了相关问题,暂未解决 .

(shuake) C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

哥们你运行目录错的

Drinkhuahuaniu commented 3 months ago

我也遇到了相关问题,暂未解决 .

(shuake) C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

image 目录得对 这些文件得在同一个目录下 在开始python main.py image

su22cmd commented 3 months ago

### 1、这是目录的截图:

屏幕截图 2024-07-01 203122

### 2、这是CMD:

`C:\Users\fengma>conda create -n shuake python=3.11 Channels:

  • defaults Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: done

Package Plan

environment location: C:\Users\fengma\miniconda3\envs\shuake

added / updated specs: - python=3.11

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
bzip2-1.0.8                |       h2bbff1b_6          90 KB
ca-certificates-2024.3.11  |       haa95532_0         128 KB
libffi-3.4.4               |       hd77b12b_1         122 KB
openssl-3.0.14             |       h827c3e9_0         7.8 MB
pip-24.0                   |  py311haa95532_0         3.5 MB
python-3.11.9              |       he1021f5_0        18.3 MB
setuptools-69.5.1          |  py311haa95532_0         1.3 MB
sqlite-3.45.3              |       h2bbff1b_0         973 KB
tk-8.6.14                  |       h0416ee5_0         3.5 MB
tzdata-2024a               |       h04d1e81_0         116 KB
vc-14.2                    |       h2eaa2aa_4          10 KB
vs2015_runtime-14.29.30133 |       h43f2093_4         1.1 MB
wheel-0.43.0               |  py311haa95532_0         171 KB
xz-5.4.6                   |       h8cc25b3_1         609 KB
zlib-1.2.13                |       h8cc25b3_1         131 KB
------------------------------------------------------------
                                       Total:        37.8 MB

The following NEW packages will be INSTALLED:

bzip2 pkgs/main/win-64::bzip2-1.0.8-h2bbff1b_6 ca-certificates pkgs/main/win-64::ca-certificates-2024.3.11-haa95532_0 libffi pkgs/main/win-64::libffi-3.4.4-hd77b12b_1 openssl pkgs/main/win-64::openssl-3.0.14-h827c3e9_0 pip pkgs/main/win-64::pip-24.0-py311haa95532_0 python pkgs/main/win-64::python-3.11.9-he1021f5_0 setuptools pkgs/main/win-64::setuptools-69.5.1-py311haa95532_0 sqlite pkgs/main/win-64::sqlite-3.45.3-h2bbff1b_0 tk pkgs/main/win-64::tk-8.6.14-h0416ee5_0 tzdata pkgs/main/noarch::tzdata-2024a-h04d1e81_0 vc pkgs/main/win-64::vc-14.2-h2eaa2aa_4 vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.29.30133-h43f2093_4 wheel pkgs/main/win-64::wheel-0.43.0-py311haa95532_0 xz pkgs/main/win-64::xz-5.4.6-h8cc25b3_1 zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_1

Proceed ([y]/n)? y

Downloading and Extracting Packages:

Preparing transaction: done Verifying transaction: done Executing transaction: done

To activate this environment, use

$ conda activate shuake

To deactivate an active environment, use

$ conda deactivate

C:\Users\fengma>conda activate shuake

(shuake) C:\Users\fengma>cd C:\Users\fengma\miniconda3\envs\INShuaKe-main 系统找不到指定的路径。

(shuake) C:\Users\fengma>cd C:\Users\fengma\miniconda3\envs\INShuaKe-main

(shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/ Collecting aiosqlite==0.17.0 (from -r requirements.txt (line 1)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a0/48/77c0092f716c4bf9460dca44f5120f70b8f71f14a12f40d22551a7152719/aiosqlite-0.17.0-py3-none-any.whl (15 kB) Collecting atlastk==0.13.3 (from -r requirements.txt (line 2)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b1/55/69fc4c89368be34f9ff4b2f4af87e1e6d5d867746848bd2e466aaf1c5058/atlastk-0.13.3-py3-none-any.whl (25 kB) Collecting certifi==2024.2.2 (from -r requirements.txt (line 3)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ba/06/a07f096c664aeb9f01624f858c3add0a4e913d6c96257acb4fce61e7de14/certifi-2024.2.2-py3-none-any.whl (163 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 kB 1.6 MB/s eta 0:00:00 Collecting charset-normalizer==3.3.2 (from -r requirements.txt (line 4)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/57/ec/80c8d48ac8b1741d5b963797b7c0c869335619e13d4744ca2f67fc11c6fc/charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.9/99.9 kB 1.9 MB/s eta 0:00:00 Collecting colorama==0.4.6 (from -r requirements.txt (line 5)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB) Collecting greenlet==3.0.3 (from -r requirements.txt (line 6)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/47/79/26d54d7d700ef65b689fc2665a40846d13e834da0486674a8d4f0f371a47/greenlet-3.0.3-cp311-cp311-win_amd64.whl (292 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.8/292.8 kB 1.8 MB/s eta 0:00:00 Collecting idna==3.6 (from -r requirements.txt (line 7)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl (61 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 3.2 MB/s eta 0:00:00 Collecting iniconfig==2.0.0 (from -r requirements.txt (line 8)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl (5.9 kB) Collecting iso8601==1.1.0 (from -r requirements.txt (line 9)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/65/6c/9d72435c72adfa6e4ed1824b6df7fffbeaaf15c653881e9b041a318ba572/iso8601-1.1.0-py3-none-any.whl (9.9 kB) Collecting numpy==1.26.4 (from -r requirements.txt (line 10)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3f/6b/5610004206cf7f8e7ad91c5a85a8c71b2f2f8051a0c0c4d5916b76d6cbb2/numpy-1.26.4-cp311-cp311-win_amd64.whl (15.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 1.8 MB/s eta 0:00:00 Collecting opencv-python==4.9.0.80 (from -r requirements.txt (line 11)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c7/ec/9dabb6a9abfdebb3c45b0cc52dec901caafef2b2c7e7d6a839ed86d81e91/opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl (38.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.6/38.6 MB 2.0 MB/s eta 0:00:00 Collecting packaging==24.0 (from -r requirements.txt (line 12)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl (53 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 2.7 MB/s eta 0:00:00 Collecting pillow==10.3.0 (from -r requirements.txt (line 13)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0a/16/c83877524c47976f16703d2e05c363244bc1e60ab439e078b3cd046d07db/pillow-10.3.0-cp311-cp311-win_amd64.whl (2.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 2.0 MB/s eta 0:00:00 Collecting playwright==1.42.0 (from -r requirements.txt (line 14)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/68/c7/49a1d08ddb29f4c0c71ad3a1e7ca3c23e40f7075a99574fe5dbf228fda05/playwright-1.42.0-py3-none-win_amd64.whl (29.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.4/29.4 MB 2.1 MB/s eta 0:00:00 Collecting pluggy==1.4.0 (from -r requirements.txt (line 15)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a5/5b/0cc789b59e8cc1bf288b38111d002d8c5917123194d45b29dcdac64723cc/pluggy-1.4.0-py3-none-any.whl (20 kB) Collecting progressbar==2.5 (from -r requirements.txt (line 16)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a3/a6/b8e451f6cff1c99b4747a2f7235aa904d2d49e8e1464e0b798272aa84358/progressbar-2.5.tar.gz (10 kB) Preparing metadata (setup.py) ... done Collecting pyee==11.0.1 (from -r requirements.txt (line 17)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7a/40/bfe7fd2cb55ca7dbb4c56e9f0060567c3e84dd9bdf8a782261f1d2d7c32f/pyee-11.0.1-py3-none-any.whl (15 kB) Collecting pypika-tortoise==0.1.6 (from -r requirements.txt (line 18)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/81/9e/cdeeceb107cb255cb039823dea80410df0b65c7372bd69ef178fea8287d5/pypika_tortoise-0.1.6-py3-none-any.whl (47 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.8/47.8 kB 2.3 MB/s eta 0:00:00 Collecting pytest==8.1.1 (from -r requirements.txt (line 19)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4d/7e/c79cecfdb6aa85c6c2e3cf63afc56d0f165f24f5c66c03c695c4d9b84756/pytest-8.1.1-py3-none-any.whl (337 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.4/337.4 kB 2.6 MB/s eta 0:00:00 Collecting pytest-base-url==2.1.0 (from -r requirements.txt (line 20)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/98/1c/b00940ab9eb8ede7897443b771987f2f4a76f06be02f1b3f01eb7567e24a/pytest_base_url-2.1.0-py3-none-any.whl (5.3 kB) Collecting pytest-playwright==0.4.4 (from -r requirements.txt (line 21)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/85/323568cd7f139551bd9b9a776e67ffbd5164a254870d27c3645ecc47a7d8/pytest_playwright-0.4.4-py3-none-any.whl (10 kB) Collecting python-slugify==8.0.4 (from -r requirements.txt (line 22)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a4/62/02da182e544a51a5c3ccf4b03ab79df279f9c60c5e82d5e8bec7ca26ac11/python_slugify-8.0.4-py2.py3-none-any.whl (10 kB) Collecting pytz==2024.1 (from -r requirements.txt (line 23)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9c/3d/a121f284241f08268b21359bd425f7d4825cffc5ac5cd0e1b3d82ffd2b10/pytz-2024.1-py2.py3-none-any.whl (505 kB) Collecting requests==2.31.0 (from -r requirements.txt (line 24)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 3.3 MB/s eta 0:00:00 Collecting text-unidecode==1.3 (from -r requirements.txt (line 25)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a6/a5/c0b6468d3824fe3fde30dbb5e1f687b291608f9473681bbf7dabbf5a87d7/text_unidecode-1.3-py2.py3-none-any.whl (78 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 kB 2.2 MB/s eta 0:00:00 Collecting tortoise-orm==0.20.0 (from -r requirements.txt (line 26)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/04/85/f446fc52525c5239b88a3c7d477853b9de8c5feb805b491936d6068b88eb/tortoise_orm-0.20.0-py3-none-any.whl (168 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.3/168.3 kB 1.7 MB/s eta 0:00:00 Collecting typing_extensions==4.10.0 (from -r requirements.txt (line 27)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl (33 kB) Collecting urllib3==2.2.1 (from -r requirements.txt (line 28)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl (121 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 3.6 MB/s eta 0:00:00 Building wheels for collected packages: progressbar Building wheel for progressbar (setup.py) ... done Created wheel for progressbar: filename=progressbar-2.5-py3-none-any.whl size=12084 sha256=931a00e6eb68895316230bf7e3f0949b24daa5334a27e908da9dc6cd7070d59c Stored in directory: c:\users\fengma\appdata\local\pip\cache\wheels\3a\82\f3\a27708cf1b8ef738f9e06996fe0b4ecc333a474adb5999690f Successfully built progressbar Installing collected packages: text-unidecode, pytz, progressbar, atlastk, urllib3, typing_extensions, python-slugify, pypika-tortoise, pluggy, pillow, packaging, numpy, iso8601, iniconfig, idna, greenlet, colorama, charset-normalizer, certifi, requests, pytest, pyee, opencv-python, aiosqlite, tortoise-orm, pytest-base-url, playwright, pytest-playwright Successfully installed aiosqlite-0.17.0 atlastk-0.13.3 certifi-2024.2.2 charset-normalizer-3.3.2 colorama-0.4.6 greenlet-3.0.3 idna-3.6 iniconfig-2.0.0 iso8601-1.1.0 numpy-1.26.4 opencv-python-4.9.0.80 packaging-24.0 pillow-10.3.0 playwright-1.42.0 pluggy-1.4.0 progressbar-2.5 pyee-11.0.1 pypika-tortoise-0.1.6 pytest-8.1.1 pytest-base-url-2.1.0 pytest-playwright-0.4.4 python-slugify-8.0.4 pytz-2024.1 requests-2.31.0 text-unidecode-1.3 tortoise-orm-0.20.0 typing_extensions-4.10.0 urllib3-2.2.1

(shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>playwright install Downloading Chromium 123.0.6312.4 (playwright build v1105) from https://playwright.azureedge.net/builds/chromium/1105/chromium-win64.zip 122.2 MiB [====================] 100% 0.0s Chromium 123.0.6312.4 (playwright build v1105) downloaded to C:\Users\fengma\AppData\Local\ms-playwright\chromium-1105 Downloading FFMPEG playwright build v1009 from https://playwright.azureedge.net/builds/ffmpeg/1009/ffmpeg-win64.zip 1.4 MiB [====================] 100% 0.0s FFMPEG playwright build v1009 downloaded to C:\Users\fengma\AppData\Local\ms-playwright\ffmpeg-1009 Downloading Firefox 123.0 (playwright build v1440) from https://playwright.azureedge.net/builds/firefox/1440/firefox-win64.zip 83.4 MiB [====================] 100% 0.0s Firefox 123.0 (playwright build v1440) downloaded to C:\Users\fengma\AppData\Local\ms-playwright\firefox-1440 Downloading Webkit 17.4 (playwright build v1983) from https://playwright.azureedge.net/builds/webkit/1983/webkit-win64.zip 47.2 MiB [====================] 100% 0.0s Webkit 17.4 (playwright build v1983) downloaded to C:\Users\fengma\AppData\Local\ms-playwright\webkit-1983

(shuake) C:\Users\fengma\miniconda3\envs\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\fengma\miniconda3\envs\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'`

是哪里出的错呢?请指教。谢谢。

请看最新回复

zekohung commented 3 months ago

我也遇到了相关问题,暂未解决 . (shuake) C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main>python main.py Traceback (most recent call last): File "C:\Users\ZekoH\PycharmProjects\ganbu\INShuaKe-main\main.py", line 2, in from shuake import Shuake ModuleNotFoundError: No module named 'shuake'

image 目录得对 这些文件得在同一个目录下 在开始python main.py image

微信截图_20240703123417 试过好几个目录好像还不行.

lonycc commented 3 months ago

@i-fengma 我正在使用golang开发一个纯exe的挂机学习软件,无外部依赖,开箱即用,但缺少测试账号,有兴趣可以私信下。

i-fengma commented 3 months ago

@i-fengma 我正在使用golang开发一个纯exe的挂机学习软件,无外部依赖,开箱即用,但缺少测试账号,有兴趣可以私信下。

不知道Github如何私信。我的邮件:dzfengma#gmail.com。请发测试账号。谢谢。

lonycc commented 3 months ago

@i-fengma 已发邮件,请查收

lonycc commented 3 months ago

@i-fengma 如果邮件没收到,可以来这里 https://github.com/lonycc/gbpx 有联系方式

lonycc commented 3 months ago

@zekohung @su22cmd 两位需要更方便的工具,可以看看这个项目 https://github.com/lonycc/gbpx

googlebox007 commented 3 months ago

代码当中的模块名写错了,把from shuke改成from Shuke即可,小写改大写 import asyncio from Shuake import Shuake

i-fengma commented 3 months ago

代码当中的模块名写错了,把from shuke改成from Shuke即可,小写改大写

import asyncio

from Shuake import Shuake

感谢!