cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMPĀ® Marketplace
Choose Language Hide Translation Bar
Isaac2
Level I

Issue installing sklearn python package with jpip

I followed the instructions to install sklearn as in 

Install Compiled Python Packages using the Command Line and jpip (jmp.com)

I got

Collecting sklearn
  Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done

but then I got a very long error message in red that at the starts with:

 

ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\isaac\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pip\_internal\cli\base_command.py", line 105, in _run_wrapper
status = _inner_run()

 

and eventually ends with

File "email\message.py", line 15, in <module>
from email import utils
File "email\utils.py", line 29, in <module>
import socket
File "C:\Program Files\JMP\JMP\18\python311.zip\socket.py", line 51, in <module>
import _socket
ModuleNotFoundError: No module named '_socket'

I can run

 

import _socket

 

from the jmp python editor and I don't get an error message, and I have found that the _socket.pyd file is in "C:\Program Files\JMP\JMP\18" folder which should be picked up by the python compiler (I checked the jpip bash file and the PYTHONHOME, PYTHONPATH variables both have "C:\Program Files\JMP\JMP\18"). I had the exact same issue trying to install the mordred package.

 

I have been fine installing matplotlib, numpy, pandas and a few other python packages (although I installed them as in Install Python Packages in JMPā€™s Python Environment).

 

I am not sure whether this could be an issue with the jmp python conflicting with python that I installed. 

 

I would appreciate it if anyone could help me out with this issue.

3 REPLIES 3
jthi
Super User

Re: Issue installing sklearn python package with jpip

Re: Issue installing sklearn python package with jpip

As described in the referenced post, I'll repeat it her for easy access.

 

The _socket error is Windows specific and due to a wrong assumption I made regarding the layout of the files installed.  It is Windows specific and is fixed in 18.1.  While the embedded Python environment finds the _socket.pyd file just fine where it is located, the setuptools process assumes that the .pyd files will be found within a DLLs/ directory.  

 

In 18.1,  I have created a DLLs subdirectoy, and moved the .pyd files and 4 Python specific DLLs from the JMP.exe directory to the DLLs/ directory.  Those 4 dlls being libcrypto-3.dll, libffi-8.dll, libssl-3.dll and sqlite3.dll. 

 

The workaround to try for 18.0, 18.0.1 is to shutdown JMP, create the DLLs/ subdirectory in the directory that contains JMP.exe, then move the .pyd files and the 4 aforementioned dlls into the DLLs subdirectory.  ( and of course restart JMP afterwards ).

 

Assuming JMP is installed in c:\Program Files\JMP\JMP\18

 

Exit JMP

make the directory c:\Program Files\JMP\JMP\18\DLLs

Move *.pyd to c:\Program Files\JMP\JMP\18\DLLs

Move libcrypto-3.dll, libffi-9.dll, libssl-3.dll and sqlite3.dll to c:\Program Files\JMP\JMP\18\DLLs

Restart JMP

 

That should fix the issue.  And JMP Python Integration finds the pyd files just fine located within the DLLs directory.

Re: Issue installing sklearn python package with jpip

Thank you, I will try it.

View more...
It seems like there might be a conflict between JMP's Python environment and a standard Python setup. Ensure youā€™re using the correct environment, update pip, and consider using a virtual environment to avoid conflicts. Writing my personal statement was stressing me out, so I used academized.com/buy-personal-statement-online for help. The writer was professional, and the personal statement was written exactly how I needed it. If youā€™re struggling with writing a personal statement like I was, this service can help you get it done on time. The quality of work is excellent, and Iā€™m really happy with the final product. It made everything so much easier.