You can import only Python libraries that are already installed in the version provided by Abaqus, thus if you're getting an error it means they're not available. And, unfortunately, Abaqus Python doesn't come with a tool to install libraries (like pip install).
What to do?
1. Use Abaqus Python to do operations that need Abaqus libraries, like creating models, extracting results from an odb, ... and store your results in text files (I usually use the csv format, but that's up to your preferences.) Then close Abaqus Python and use any other Python distribution to use all the libraries you want. To automatize the switch between the two set of scripts (Abaqus Python + any other Python), you can: use a "master" Python script from which you call Abaqus/cae-/viewer-/python with subprocess.call() or write a bash script (in Linux) or command file (in Windows) to launch the two scripts one after the other. The latter option is the most secure (subprocess.call() can be used for injection attacks) and offers the same flexibility as with the Python script (input parameters, creating file names at runtime, ...)
2. You can install the package in any other Python distribution, then go to its main directory and look for the corresponding installation files. Copy these files and paste them in the libraries' directory of Abaqus python.
Option 1 will work for sure, option 2 is a workaround and not guaranteed to be successful.
Hi abhimanyu , thanks for your response. You want me to type the following command in Abaqus python console? If yes, then I did the same, but it says "invalid syntax"