Python Forum
Unsure why module is not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unsure why module is not working
#1
I am trying to run a piece of code acquired from someone online (trusted source). I run the program and I get the following error...

Error:
C:\Users\garyn\Downloads\######\######>py Analysis.py Traceback (most recent call last): File "C:\Users\garyn\Downloads\######\######\Analysis.py", line 18, in <module> from sklearn.preprocessing import StandardScaler File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\__init__.py", line 82, in <module> from .base import clone File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 17, in <module> from .utils import _IS_32BIT File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\__init__.py", line 17, in <module> from scipy.sparse import issparse File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\__init__.py", line 283, in <module> from . import csgraph File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\csgraph\__init__.py", line 185, in <module> from ._laplacian import laplacian File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\csgraph\_laplacian.py", line 7, in <module> from scipy.sparse.linalg import LinearOperator File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\linalg\__init__.py", line 120, in <module> from ._isolve import * File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\linalg\_isolve\__init__.py", line 4, in <module> from .iterative import * File "C:\Users\garyn\AppData\Local\Programs\Python\Python311\Lib\site-packages\scipy\sparse\linalg\_isolve\iterative.py", line 9, in <module> from . import _iterative ImportError: DLL load failed while importing _iterative: %1 is not a valid Win32 application.
All relevant modules are installed. This requries sklearn, which requires scipy, which calls iterative.py, which fails?

Obviously, scipy is a major package that appears to be used by lots of people, with no errors being reported (that I can find) and I have just installed the latest versions of everything (downgrading numpy, as the system requires <1.24 and I had 1.24.2).

Any ideas why this is being generated?

Everything is in the path and this is not a virtual environment. I am running Python 3.11.0 with 23.0
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  working with TLV module Object Jennifer_Jone 3 1,157 Mar-14-2023, 07:54 PM
Last Post: Jennifer_Jone
  Pandas module not working Hass 2 1,732 Apr-14-2022, 03:13 PM
Last Post: snippsat
  importing module - not working jdhamblett 3 3,032 Jun-22-2020, 07:33 PM
Last Post: jdhamblett
  setup() from turtle module not working bobfat 7 6,181 Oct-28-2019, 11:05 AM
Last Post: newbieAuggie2019
  pyinstaller not working with acoustics module pynz 2 2,779 Oct-08-2019, 07:56 AM
Last Post: pynz
  import keyboard module doesn't get found - working on laptop but no on raspberry pi.. HANSJORG2 1 8,177 Mar-16-2018, 02:48 PM
Last Post: sparkz_alot
  Logging module stopped working! llanitedave 1 8,003 Oct-18-2017, 06:45 AM
Last Post: llanitedave

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020