Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Python
➜ Issue with Python install
Issue with Python install
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Noname
(3 posts) Bio
|
Date
| Sun 13 Aug 2023 03:56 AM (UTC) |
Message
| I am getting a 'Class not registered' issue.
Error -2147221164 occurred when loading scripting engine:
Class not registered
I use anaconda. Here are the steps that I followed:
1. Create a new environment that uses 32bit python 2.7 and activated it
2. pip install pywin32 and did the post install script
3. Registered using the axscript
I have tried all combinations of running the post install script and axscript with user and admin privileges, with my default python and with the 2.7 python executables, outside of virtual environments.
I also tried to run mushclient from the environment that I created, but mushclient would close suddenly every time I loaded a world file.
I just can't seem to get python scripting working.
Any suggestions? Thank you. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 13 Aug 2023 07:23 AM (UTC) |
Message
| Search this forum for 2147221164.
There are a few posts about it, mainly it seems that Python scripting was not properly installed.
We haven't had many queries about that recently, so I'm not sure what to suggest.
You could try switching to Lua for scripting. It's another interpreted language, not that dissimilar to Python (except that indenting is not important).
Lua support is inbuilt in the client.
Instead of dicts and lists, Lua has tables, which perform a very similar function. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Noname
(3 posts) Bio
|
Date
| Reply #2 on Fri 18 Aug 2023 01:34 PM (UTC) |
Message
| I appreciate the response.
Playing a MUD right now isn't critical for me; I just wanted a project to practice Python. I will probably just focus on SCPI programming for my instruments at work instead.
I have found the dlls that pywin32 produces and I've shoved them in various directories, like system32 and so on. I even tried re-registering every dll, huge mistake! Currently my anaconda install is just a base environment and I've tried their packaged pywin32. Although, the issue could be that the base install is not 32bit interpreter, however you'd probably have to use a new environment for the 32bit anyway. Still get the same CLSID error, despite finding it in regedit and setting whatever paths there are to the correct path. I still have some ideas that I could try, but ran out of motivation.
I thought I'd mention what I've tried so far, just in case anybody else still struggles with this issue. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 18 Aug 2023 08:05 PM (UTC) |
Message
| If you want to play with Python, you could just do it stand-alone. I've been doing that recently. You can do graphics and all sorts of cool stuff with it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Noname
(3 posts) Bio
|
Date
| Reply #4 on Sun 24 Sep 2023 02:55 AM (UTC) Amended on Sun 24 Sep 2023 03:02 AM (UTC) by Noname
|
Message
| I messed around with this problem here and there when I had time and I finally got it working.
Roughly here are the steps that I followed:
1. Installed the latest version of Anaconda 64bit
2. Created a 32bit python environment:
- Make sure to install the conda package in this environment
3. While in the 32bit environment, follow the instructions for installing pywin32 from https://pypi.org/project/pywin32/
- Run the post install script with admin permissions so that it will write to the sysWOW64 or whatever system folder
4. You can check the regedit entry for {DF630910-1C1D-11d0-AE36-8C0F5E000000} to make sure that it has the path for those pywin32 libraries (sysWOW64 or whatever from step 3)
5. Get the path to the 32bit python environment folder, you can type where python while in the 32bit python environment to get the path
6. While in the 32bit python environment, type set PYTHONHOME=<the path that you got from step 5>
7. Within the folder that you find in step 5, there will be a Lib\site-packages folder, copy the full path to that folder
8. While in the 32bit python environment, type set PYTHONPATH=<the path that you got from step 7>
9. While in the 32bit python environment, go to your mushclient directory and type conda run mushclient.exe
I feel like my steps and explanation may be hard to follow. If there is anybody that is trying this method and having issues, then post a question in this thread and I'll try to help out. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
4,108 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top