Message12854

Author Vikhe
Recipients Vikhe
Date 2019-12-18.13:27:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576675639.05.0.951692780799.issue2852@roundup.psfhosted.org>
In-reply-to
Content
Hi Team,

I want to import requests, json module in my java code .
I have installed Jpython on unix & also installed requests module as well .
My code is like :
pythonInterp.exec("sys.path.append(\"/home/ec2-user/yogita/jpython/Lib/site-packages\")");
		pythonInterp.exec("print (sys.path)");
		pythonInterp.exec("import requests");

And output is like 
['/home/ec2-user/yogita/jpython/Lib', '/home/ec2-user/yogita/jpython/Lib', '__classpath__', '__pyclasspath__/', '/home/ec2-user/yogita/jpython/Lib/site-packages', '/home/ec2-user/yogita/jpython/Lib/site-packages']
Exception while importing python module: Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named requests
 

/home/ec2-user/yogita/jpython/Lib/site-packages
[ec2-user@ip-10-111-111-111 site-packages]$ ll
total 80
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:25 certifi
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:25 certifi-2019.11.28.dist-info
drwxrwxr-x  3 ec2-user ec2-user 4096 Dec 18 11:25 chardet
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:25 chardet-3.0.4.dist-info
-rw-rw-r--  1 ec2-user ec2-user  126 Dec 18 08:59 easy_install.py
-rw-rw-r--  1 ec2-user ec2-user 2901 Dec 18 08:59 easy_install$py.class
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:25 idna
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:25 idna-2.8.dist-info
drwxrwxr-x 10 ec2-user ec2-user 4096 Dec 18 08:59 pip
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 08:59 pip-9.0.1.dist-info
drwxrwxr-x  4 ec2-user ec2-user 4096 Dec 18 08:59 pkg_resources
-rw-rw-r--  1 ec2-user ec2-user  119 Jun 30  2017 README
drwxrwxr-x  2 ec2-user ec2-user 4096 Dec 18 11:26 requests
History
Date User Action Args
2019-12-18 13:27:19Vikhesetrecipients: + Vikhe
2019-12-18 13:27:19Vikhesetmessageid: <1576675639.05.0.951692780799.issue2852@roundup.psfhosted.org>
2019-12-18 13:27:18Vikhelinkissue2852 messages
2019-12-18 13:27:18Vikhecreate