Open kunal-3196 opened 1 month ago
dpf is working but mapdl doesn't
Hi @kunal-3196
Can you post here the output of python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"
?
Hi @germa89 thanks for replying, please check below output:
C:\Users\LENOVO\AppData\Roaming\Python\Python311\site-packages\pyvista\utilities\__init__.py:72: PyVistaDeprecationWarning: The `pyvista.utilities` module has been deprecated. `GPUInfo` is now imported as: `from pyvista.report import GPUInfo`.
warnings.warn(
-------------------------------------------------------------------------------
PyMAPDL Software and Environment Report
Packages Requirements
*********************
Core packages
-------------
ansys.mapdl.core : 0.68.4
numpy : 1.26.4
platformdirs : 4.2.2
scipy : 1.14.0
grpc : Package not found
ansys.api.mapdl.v0 : Package not found
ansys.mapdl.reader : 0.53.0
google.protobuf : Package not found
Optional packages
-----------------
matplotlib : 3.9.1
pyvista : 0.44.0
pyiges : 0.3.1
tqdm : 4.66.4
Ansys Installation
******************
Version Location
------------------
241 C:\Program Files\ANSYS Inc\ANSYS Student\v241
Ansys Environment Variables
***************************
ANSYS241_DIR C:\Program Files\ANSYS Inc\ANSYS Student\v241\ANSYS
AWP_LOCALE241 en-us
AWP_ROOT241 C:\Program Files\ANSYS Inc\ANSYS Student\v241
CADOE_LIBDIR241 C:\Program Files\ANSYS Inc\ANSYS Student\v241\CommonFiles\Language\en-us
@germa89 Launched, below is the output: DEBUG - pymapdl_global - launcher - get_start_instance - PYMAPDL_START_INSTANCE is unset. Using default value None. DEBUG - pymapdl_global - launcher - get_start_instance - 'PYMAPDL_START_INSTANCE' is unset, and there is no supplied value. Using default, which is 'True'. DEBUG - pymapdl_global - launcher - launch_mapdl - Using 'start_instance' equal to True. DEBUG - pymapdl_global - launcher - launch_mapdl - No IP address was supplied. Using the default IP address: 127.0.0.1 DEBUG - pymapdl_global - launcher - launch_mapdl - Using default port 50052 DEBUG - pymapdl_global - launcher - launch_mapdl - Using default executable. DEBUG - pymapdl_global - launcher - launch_mapdl - Using default run location. DEBUG - pymapdl_global - launcher - launch_mapdl - Created run location at C:\Users\LENOVO\AppData\Local\Temp\ansys_yzpepcughi DEBUG - pymapdl_global - launcher - launch_mapdl - Using run location at C:\Users\LENOVO\AppData\Local\Temp\ansys_yzpepcughi DEBUG - pymapdl_global - launcher - check_lock_file - Checking for lock file DEBUG - pymapdl_global - launcher - launch_mapdl - Using mode grpc DEBUG - pymapdl_global - launcher - _force_smp_student_version - Student version detected, using '-smp' switch by default. DEBUG - pymapdl_global - launcher - launch_mapdl - Using additional switches -smp. DEBUG - pymapdl_global - launcher - launch_mapdl - Using start parameters {'exec_file': 'C:\Program Files\ANSYS Inc\ANSYS Student\v222\ansys\bin\winx64\ansys222.exe', 'run_location': 'C:\Users\LENOVO\AppData\Local\Temp\ansys_yzpepcughi', 'additional_switches': ' -smp', 'jobname': 'file', 'nproc': 2, 'print_com': False, 'ram': None, 'override': False, 'timeout': 45} DEBUG - pymapdl_global - launcher - launch_mapdl - Checking license server. DEBUG - pymapdl_global - launcher - launch_mapdl - Starting MAPDL DEBUG - pymapdl_global - launcher - launch_grpc - Starting 'launch_mapdl'. DEBUG - pymapdl_global - launcher - check_lock_file - Checking for lock file DEBUG - pymapdl_global - launcher - launch_grpc - Writing temporary input file: .tmp.inp with 'FINISH' command. DEBUG - pymapdl_global - launcher - launch_grpc - Starting MAPDL with command: "C:\Program Files\ANSYS Inc\ANSYS Student\v222\ansys\bin\winx64\ansys222.exe" -j file -np 2 -b -i .tmp.inp -o .tmp.out -smp -port 50052 -grpc INFO - pymapdl_global - launcher - launch_grpc - Running a local instance at port 50052 the following command: '"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ansys\bin\winx64\ansys222.exe" -j file -np 2 -b -i .tmp.inp -o .tmp.out -smp -port 50052 -grpc' DEBUG - pymapdl_global - launcher - launch_grpc - MAPDL starting in background. DEBUG - pymapdl_global - launcher - launch_mapdl - Checking license server. Traceback (most recent call last):
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File c:\misc\iu_downloads\thesis\untitled0.py:8 mapdl = launch_mapdl(loglevel="DEBUG")
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:1833 in launch_mapdl raise exception
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:1795 in launch_mapdl port, actual_run_location, process = launch_grpc(
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:605 in launch_grpc process = subprocess.Popen(
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py:109 in init super(SubprocessPopen, self).init(*args, **kwargs)
File C:\ProgramData\anaconda3\Lib\subprocess.py:1026 in init self._execute_child(args, executable, preexec_fn, close_fds,
File C:\ProgramData\anaconda3\Lib\subprocess.py:1538 in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
You are running MAPDL v222:
DEBUG - pymapdl_global - launcher - launch_mapdl - Using start parameters {'exec_file': 'C:\Program Files\ANSYS Inc\ANSYS Student\v222\ansys\bin\winx64\ansys222.exe', 'run_location': 'C:\Users\LENOVO\AppData\Local\Temp\ansys_yzpepcughi', 'additional_switches': ' -smp', 'jobname': 'file', 'nproc': 2, 'print_com': False, 'ram': None, 'override': False, 'timeout': 45}
However, you do not have that version installed, from the report, you have:
Ansys Installation
******************
Version Location
------------------
241 C:\Program Files\ANSYS Inc\ANSYS Student\v241
Make sure you using the right executable, or just do not specify the exec path. PyMAPDL should detect it.
Also... I believe you installed v222 and then update to v241 and uninstalled v222.
So I guess your CONFIG_FILE
is outdate. Check this link to fix it by using save_ansys_path
:
🤓 Before submitting the issue
pip install --upgrade --upgrade-strategy eager ansys-mapdl-core
in your activated virtual environment.🔍 Description of the bug
[WinError 2] The system cannot find the file specified
Facing above error while launching mapdl
🕵️ Steps To Reproduce
💻 Which Operating System are you using?
Windows
🐍 Which Python version are you using?
3.11
💾 Which MAPDL version are you using?
2024R1
📝 PyMAPDL Report
ansys-mapdl-core-0.68.4
📝 Installed packages
Show the installed packages!
```text # PASTE HERE THE OUTPUT OF `python -m pip freeze` here ```📝 Logger output file
runfile('C:/MISC/Python_code/untitled0.py', wdir='C:/MISC/Python_code') Traceback (most recent call last):
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File c:\misc\python_code\untitled0.py:27 mapdl = launch_mapdl(loglevel="ERROR")
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:1833 in launch_mapdl raise exception
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:1795 in launch_mapdl port, actual_run_location, process = launch_grpc(
File ~\AppData\Roaming\Python\Python311\site-packages\ansys\mapdl\core\launcher.py:605 in launch_grpc process = subprocess.Popen(
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py:109 in init super(SubprocessPopen, self).init(*args, **kwargs)
File C:\ProgramData\anaconda3\Lib\subprocess.py:1026 in init self._execute_child(args, executable, preexec_fn, close_fds,
File C:\ProgramData\anaconda3\Lib\subprocess.py:1538 in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified