m0in92 / EV_sim

Electric Vehicle Dynamics Simulation
MIT License
11 stars 6 forks source link

_ModuleNotFoundError: No module named 'customtkinter'_ #6

Open KaVo194 opened 10 months ago

KaVo194 commented 10 months ago

Hello, When Installing via 'python setup.py sdist' I get a ModuleNotFoundError: No module named 'customtkinter' How can I fix that?

Traceback (most recent call last): File "/Users/kaivoigt/EV_sim-main/setup.py", line 2, in <module> from EV_sim.version import __version__ File "/Users/kaivoigt/EV_sim-main/EV_sim/__init__.py", line 15, in <module> from .tkinter_gui.main import VehicleDynamicsApp File "/Users/kaivoigt/EV_sim-main/EV_sim/tkinter_gui/main.py", line 9, in <module> import customtkinter as ctk ModuleNotFoundError: No module named 'customtkinter'

_Originally posted by @KaVo194 in https://github.com/m0in92/EV_sim/issues/4#issuecomment-1900673410_

m0in92 commented 10 months ago

Can you please let me know of the python version used for the installation?

KaVo194 commented 10 months ago

Thanks for your kind response. I used Python 3.11.5

m0in92 commented 10 months ago

No problem!

In step 4, were you able to run the command "pip install -r requirements.txt"? This steps installs the required external python modules used in this project. If you did, can you try running "pip install customtkinter" after running "pip install -r requirements.txt".

Let me know what happens!

Best regards

KaVo194 commented 10 months ago

Hmm. I ran "Here is what happens when I run "pip install -r requirements.txt" `(base) ➜ EV_sim-main pip install -r requirements.txt Collecting asgiref==3.7.2 (from -r requirements.txt (line 1)) Downloading asgiref-3.7.2-py3-none-any.whl.metadata (9.2 kB) Requirement already satisfied: colorama==0.4.6 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (0.4.6) Requirement already satisfied: contourpy==1.0.5 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (1.0.5) Collecting customtkinter==5.1.3 (from -r requirements.txt (line 4)) Downloading customtkinter-5.1.3-py3-none-any.whl (295 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 295.2/295.2 kB 6.2 MB/s eta 0:00:00 Collecting cx-Freeze==6.15.1 (from -r requirements.txt (line 5)) Downloading cx_Freeze-6.15.1-cp311-cp311-macosx_11_0_arm64.whl.metadata (6.9 kB) Collecting cx-Logging==3.1.0 (from -r requirements.txt (line 6)) Downloading cx_Logging-3.1.0.tar.gz (27 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: cycler==0.11.0 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 7)) (0.11.0) Collecting darkdetect==0.8.0 (from -r requirements.txt (line 8)) Downloading darkdetect-0.8.0-py3-none-any.whl (9.0 kB) Collecting Django==4.2.7 (from -r requirements.txt (line 9)) Downloading Django-4.2.7-py3-none-any.whl.metadata (4.1 kB) Collecting exceptiongroup==1.2.0 (from -r requirements.txt (line 10)) Downloading exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB) Collecting fonttools==4.37.4 (from -r requirements.txt (line 11)) Downloading fonttools-4.37.4-py3-none-any.whl (960 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 960.8/960.8 kB 8.6 MB/s eta 0:00:00 Collecting iniconfig==2.0.0 (from -r requirements.txt (line 12)) Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB) Requirement already satisfied: kiwisolver==1.4.4 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 13)) (1.4.4) Collecting lief==0.13.2 (from -r requirements.txt (line 14)) Downloading lief-0.13.2-cp311-cp311-macosx_11_0_arm64.whl.metadata (4.0 kB) Collecting matplotlib==3.6.1 (from -r requirements.txt (line 15)) Downloading matplotlib-3.6.1-cp311-cp311-macosx_11_0_arm64.whl (7.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 3.6 MB/s eta 0:00:00 Collecting numpy==1.23.4 (from -r requirements.txt (line 16)) Downloading numpy-1.23.4-cp311-cp311-macosx_11_0_arm64.whl (13.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.3/13.3 MB 9.1 MB/s eta 0:00:00 Collecting packaging==21.3 (from -r requirements.txt (line 17)) Downloading packaging-21.3-py3-none-any.whl (40 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 4.2 MB/s eta 0:00:00 Collecting pytz==2022.5 (from -r requirements.txt (line 18)) Downloading pytz-2022.5-py2.py3-none-any.whl (500 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 500.7/500.7 kB 8.4 MB/s eta 0:00:00 Requirement already satisfied: six==1.16.0 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 19)) (1.16.0) Collecting sqlparse==0.4.4 (from -r requirements.txt (line 20)) Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 5.0 MB/s eta 0:00:00 Collecting tomli==2.0.1 (from -r requirements.txt (line 21)) Downloading tomli-2.0.1-py3-none-any.whl (12 kB) Collecting typing_extensions==4.8.0 (from -r requirements.txt (line 22)) Downloading typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB) Requirement already satisfied: tzdata==2023.3 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from -r requirements.txt (line 23)) (2023.3) Collecting setuptools<68,>=62.6 (from cx-Freeze==6.15.1->-r requirements.txt (line 5)) Downloading setuptools-67.8.0-py3-none-any.whl.metadata (6.2 kB) Requirement already satisfied: pillow>=6.2.0 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from matplotlib==3.6.1->-r requirements.txt (line 15)) (10.0.1) Requirement already satisfied: pyparsing>=2.2.1 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from matplotlib==3.6.1->-r requirements.txt (line 15)) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /Users/kaivoigt/anaconda3/lib/python3.11/site-packages (from matplotlib==3.6.1->-r requirements.txt (line 15)) (2.8.2) Downloading asgiref-3.7.2-py3-none-any.whl (24 kB) Downloading cx_Freeze-6.15.1-cp311-cp311-macosx_11_0_arm64.whl (18.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 5.0 MB/s eta 0:00:00 Downloading Django-4.2.7-py3-none-any.whl (8.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 9.2 MB/s eta 0:00:00 Downloading exceptiongroup-1.2.0-py3-none-any.whl (16 kB) Downloading lief-0.13.2-cp311-cp311-macosx_11_0_arm64.whl (3.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 9.1 MB/s eta 0:00:00 Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB) Downloading setuptools-67.8.0-py3-none-any.whl (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 8.9 MB/s eta 0:00:00 Building wheels for collected packages: cx-Logging Building wheel for cx-Logging (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for cx-Logging (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [38 lines of output] running bdist_wheel running build running build_ext building 'cx_Logging' extension creating build creating build/temp.macosx-11.1-arm64-cpython-311 creating build/temp.macosx-11.1-arm64-cpython-311/src clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/kaivoigt/anaconda3/include -arch arm64 -fPIC -O2 -isystem /Users/kaivoigt/anaconda3/include -arch arm64 -DCX_LOGGING_CORE -DBUILD_VERSION=3.1.0 -I/Users/kaivoigt/anaconda3/include/python3.11 -c src/cx_Logging.c -o build/temp.macosx-11.1-arm64-cpython-311/src/cx_Logging.o src/cx_Logging.c:949:5: warning: 'sem_init' is deprecated [-Wdeprecated-declarations] INITIALIZE_LOCK(loggingState->lock); ^ src/cx_Logging.c:37:33: note: expanded from macro 'INITIALIZE_LOCK'

define INITIALIZE_LOCK(lock) sem_init(&lock, 0, 1)

                                  ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here
  int sem_init(sem_t *, int, unsigned int) __deprecated;
                                           ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:211:40: note: expanded from macro '__deprecated'
  #define __deprecated    __attribute__((__deprecated__))
                                         ^
  src/cx_Logging.c:2703:5: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
      INITIALIZE_LOCK(gLoggingStateLock);
      ^
  src/cx_Logging.c:37:33: note: expanded from macro 'INITIALIZE_LOCK'
  #define INITIALIZE_LOCK(lock)   sem_init(&lock, 0, 1)
                                  ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here
  int sem_init(sem_t *, int, unsigned int) __deprecated;
                                           ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:211:40: note: expanded from macro '__deprecated'
  #define __deprecated    __attribute__((__deprecated__))
                                         ^
  2 warnings generated.
  creating build/lib.macosx-11.1-arm64-cpython-311
  clang -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/kaivoigt/anaconda3/lib -L/Users/kaivoigt/anaconda3/lib -Wl,-rpath,/Users/kaivoigt/anaconda3/lib -L/Users/kaivoigt/anaconda3/lib build/temp.macosx-11.1-arm64-cpython-311/src/cx_Logging.o -o build/lib.macosx-11.1-arm64-cpython-311/cx_Logging.cpython-311-darwin.so -Wl,-soname,cx_Logging.cpython-311-darwin.so
  ld: unknown options: -soname
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command '/usr/bin/clang' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cx-Logging Failed to build cx-Logging ERROR: Could not build wheels for cx-Logging, which is required to install pyproject.toml-based projects (`