<div dir="ltr">sudo apt-get install jython jython-doc<div><br></div><div>It's in the repos... much better approach, in most cases.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 3:53 PM, Thufir Hawat <span dir="ltr"><<a href="mailto:hawat.thufir@gmail.com" target="_blank">hawat.thufir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Going by the jython book:<br>
<br>
<a href="http://www.jython.org/jythonbook/en/1.0/appendixA.html" rel="noreferrer" target="_blank">http://www.jython.org/jythonbo<wbr>ok/en/1.0/appendixA.html</a><br>
<br>
<br>
I downloaded their script, ez_setup.py and ran it as so:<br>
<br>
<br>
<br>
<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ jython ez_setup.py<br>
"my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15.<br>
Downloading <a href="http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg" rel="noreferrer" target="_blank">http://pypi.python.org/package<wbr>s/2.5/s/setuptools/setuptools-<wbr>0.6c11-py2.5.egg</a><br>
error: can't create or remove files in install directory<br>
<br>
The following error occurred while trying to add or remove files in the<br>
installation directory:<br>
<br>
  Â  [Errno 13] Permission denied: '/usr/Lib/site-packages/test-e<wbr>asy-install-1965022501.write-t<wbr>est'<br>
<br>
The installation directory you specified (via --install-dir, --prefix, or<br>
the distutils default setting) was:<br>
<br>
  Â  /usr/Lib/site-packages/<br>
<br>
This directory does not currently exist.  Please create it and try again, or<br>
choose a different installation directory (using the -d or --install-dir<br>
option).<br>
<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ mkdir usr/Lib/site-packages/<br>
mkdir: cannot create directory â€˜usr/Lib/site-packages/’: No such file or directory<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ sudo usr/Lib/site-packages/<br>
[sudo] password for thufir:<br>
sudo: usr/Lib/site-packages/: command not found<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ sudo mkdir usr/Lib/site-packages/<br>
mkdir: cannot create directory â€˜usr/Lib/site-packages/’: No such file or directory<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ mkdir /usr/Lib/site-packages/<br>
mkdir: cannot create directory â€˜/usr/Lib/site-packages/’: No such file or directory<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ sudo mkdir /usr/Lib/site-packages/<br>
mkdir: cannot create directory â€˜/usr/Lib/site-packages/’: No such file or directory<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ ll /usr/<br>
total 128<br>
drwxr-xr-x  11 root root  4096 Apr 20  2016 ./<br>
drwxr-xr-x  24 root root  4096 Dec 11 05:44 ../<br>
drwxr-xr-x  Â 2 root root 61440 Jan 16 07:05 bin/<br>
drwxr-xr-x  Â 2 root root  4096 Apr 20  2016 games/<br>
drwxr-xr-x  57 root root  4096 Jan 15 07:34 include/<br>
drwxr-xr-x 173 root root 12288 Jan 15 11:45 lib/<br>
drwxr-xr-x  10 root root  4096 Apr 20  2016 local/<br>
drwxr-xr-x  Â 3 root root  4096 Apr 20  2016 locale/<br>
drwxr-xr-x  Â 2 root root 12288 Jan 15 08:17 sbin/<br>
drwxr-xr-x 337 root root 12288 Jan 16 07:05 share/<br>
drwxr-xr-x  Â 4 root root  4096 Apr 20  2016 src/<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ mkdir /usr/Lib/<br>
mkdir: cannot create directory â€˜/usr/Lib/’: Permission denied<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ sudo mkdir /usr/Lib/<br>
thufir@doge:~/jython$ sudo mkdir /usr/Lib/site-packages/<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$<br>
thufir@doge:~/jython$ jython ez_setup.py<br>
"my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15.<br>
Downloading <a href="http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg" rel="noreferrer" target="_blank">http://pypi.python.org/package<wbr>s/2.5/s/setuptools/setuptools-<wbr>0.6c11-py2.5.egg</a><br>
error: can't create or remove files in install directory<br>
<br>
The following error occurred while trying to add or remove files in the<br>
installation directory:<br>
<br>
  Â  [Errno 13] Permission denied: '/usr/Lib/site-packages/test-e<wbr>asy-install-899999428.write-te<wbr>st'<br>
<br>
The installation directory you specified (via --install-dir, --prefix, or<br>
the distutils default setting) was:<br>
<br>
  Â  /usr/Lib/site-packages/<br>
<br>
Perhaps your account does not have write access to this directory?  If the<br>
installation directory is a system-owned directory, you may need to sign in<br>
as the administrator or "root" account.  If you do not have administrative<br>
access to this machine, you may wish to choose a different installation<br>
directory, preferably one that is listed in your PYTHONPATH environment<br>
variable.<br>
<br>
For information on other options, you may wish to consult the<br>
documentation at:<br>
<br>
  <a href="http://peak.telecommunity.com/EasyInstall.html" rel="noreferrer" target="_blank">http://peak.telecommunity.com/<wbr>EasyInstall.html</a><br>
<br>
Please make the appropriate changes for your system and try again.<br>
<br>
thufir@doge:~/jython$<br>
<br>
<br>
<br>
<br>
<br>
<br>
This isn't available through apt?  The only solution seems to be run this script with sudo, which I'm reasonably comfortable with.  The probabilities seem remote that their would be an actual problem.  Still, surely there must be alternatives?<br>
<br>
The point of this is to be able to, for example, run python-twitter from within jython.<br>
<br>
<br>
<br>
thanks,<br>
<br>
Thufir<br>--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/ubuntu-users</a><br>
<br></blockquote></div><br></div>