Ask Your Question

Revision history [back]

PackageNotFoundError and SyntaxError

When I typed in (1000*q1).integral_points_count(), I got the following message:

--------------------------------------------------------------------------- PackageNotFoundError
Traceback (most recent call last) <ipython-input-75-395b663ed32e> in <module>() ----> 1 (Integer(1000)*q1).integral_points_count()

/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py in integral_points_count(self, verbose, use_Hrepresentation, explicit_enumeration_threshold, preprocess, *kwds) 216 cdd=True, 217 verbose=verbose, --> 218 *kwds)

/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py in count(arg, ehrhart_polynomial, multivariate_generating_function, raw_output, verbose, **kwds) 148 except OSError: 149 from sage.misc.package import PackageNotFoundError --> 150 raise PackageNotFoundError('latte_int') 151 152 ans, err = latte_proc.communicate(arg)

PackageNotFoundError: the package 'latte_int' was not found. You can install it by running 'sage -i latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

File "<ipython-input-76-d56a71c64d98>", line 1 sage -i latte_int ^ SyntaxError: invalid syntax

Why am I getting these conflicting messages?

PackageNotFoundError and SyntaxError

When I typed in (1000*q1).integral_points_count(), I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError 
Traceback (most recent call last) <ipython-input-75-395b663ed32e> in <module>() ----> 1 (Integer(1000)*q1).integral_points_count()

(Integer(1000)*q1).integral_points_count() /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py in integral_points_count(self, verbose, use_Hrepresentation, explicit_enumeration_threshold, preprocess, *kwds) **kwds) 216 cdd=True, 217 verbose=verbose, --> 218 *kwds)

**kwds) /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py in count(arg, ehrhart_polynomial, multivariate_generating_function, raw_output, verbose, **kwds) 148 except OSError: 149 from sage.misc.package import PackageNotFoundError --> 150 raise PackageNotFoundError('latte_int') 151 152 ans, err = latte_proc.communicate(arg)

latte_proc.communicate(arg) PackageNotFoundError: the package 'latte_int' was not found. You can install it by running 'sage -i latte_int' in a shell

shell

However, when I used sage -i latte_int, I got the error message

 File "<ipython-input-76-d56a71c64d98>", line 1
     sage -i latte_int
                     ^
 SyntaxError: invalid syntax

syntax

Why am I getting these conflicting messages?

PackageNotFoundError and SyntaxError

When I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in (1000*q1).integral_points_count(), in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Why am I getting these conflicting messages?

PackageNotFoundError and SyntaxError

When I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Why Does anyone know why am I getting these conflicting messages?messages? I tried it both on a VirtualBox and Windows, but they both give the same messages.

PackageNotFoundError and SyntaxError

When In a notebook, when I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Does anyone know why am I getting these conflicting messages? I tried it both on a VirtualBox and Windows, but they both give the same messages.

EDIT: When I open a shell, there is a message on top saying

Starting subshell with Sage environment variable set. Don't forget to exit when you are done. Beware:
* Do not do anything with other copies of Sage on your system.
Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell.

When I enter sage -i latte_int in anyway, I get

make: *** No rule to make target 'all-toolchain'.  Stop.

Typing sage -i latte_int in a terminal or console gives the same result.

Entering !sage -i latte_int in a Notebook, I get an OSError


OSError Traceback (most recent call last) <ipython-input-1-f5647ef902a7> in <module>() ----> 1 get_ipython().system(u'sage -i latte_int')

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py in system_piped(self, cmd) 2207 # a non-None value would trigger :func:sys.displayhook calls. 2208 # Instead, we store the exit_code in user_ns. -> 2209 self.user_ns['_exit_code'] = system(self.var_expand(cmd, depth=1)) 2210 2211 def system_raw(self, cmd):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/utils/_process_posix.py in system(self, cmd) 155 child = pexpect.spawnb(self.sh, args=['-c', cmd]) # Pexpect-U 156 else: --> 157 child = pexpect.spawn(self.sh, args=['-c', cmd]) # Vanilla Pexpect 158 flush = sys.stdout.flush 159 while True:

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions) 196 self.name = '<pexpect factory="" incomplete="">' 197 else: --> 198 self._spawn(command, args, preexec_fn, dimensions) 199 200 def __str__(self):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawn(self, command, args, preexec_fn, dimensions) 296 297 self.ptyproc = self._spawnpty(self.args, env=self.env, --> 298 cwd=self.cwd, **kwargs) 299 300 self.pid = self.ptyproc.pid

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawnpty(self, args, *kwargs) 307 def _spawnpty(self, args, *kwargs): 308 '''Spawn a pty and return an instance of PtyProcess.''' --> 309 return ptyprocess.PtyProcess.spawn(args, **kwargs) 310 311 def close(self, force=True):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.py in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions) 218 219 if use_native_pty_fork: --> 220 pid, fd = pty.fork() 221 else: 222 # Use internal fork_pty, for Solaris

/opt/sagemath-8.1/local/lib/python2.7/pty.py in fork() 106 107 master_fd, slave_fd = openpty() --> 108 pid = os.fork() 109 if pid == CHILD: 110 # Establish a new session.

OSError: [Errno 11] Resource temporarily unavailable

PackageNotFoundError and SyntaxError

In a notebook, when I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Does anyone know why am I getting these conflicting messages? I tried it both on a VirtualBox and Windows, but they both give the same messages.

EDIT: When I open a shell, there is a message on top saying

Starting subshell with Sage environment variable set. Don't forget to exit when you are done. Beware:
* Do not do anything with other copies of Sage on your system.
Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell.

When I enter sage -i latte_int in anyway, I get

make: *** No rule to make target 'all-toolchain'.  Stop.

Typing sage -i latte_int in a terminal or console gives the same result.

Entering !sage -i latte_int in a Notebook, I get an OSError


---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-f5647ef902a7> in <module>()
----> 1 get_ipython().system(u'sage -i latte_int')

latte_int') /opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py in system_piped(self, cmd) 2207 # a non-None value would trigger :func:sys.displayhook :func:`sys.displayhook` calls. 2208 # Instead, we store the exit_code in user_ns. -> 2209 self.user_ns['_exit_code'] = system(self.var_expand(cmd, depth=1)) 2210 2211 def system_raw(self, cmd):

cmd): /opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/utils/_process_posix.py in system(self, cmd) 155 child = pexpect.spawnb(self.sh, args=['-c', cmd]) # Pexpect-U 156 else: --> 157 child = pexpect.spawn(self.sh, args=['-c', cmd]) # Vanilla Pexpect 158 flush = sys.stdout.flush 159 while True:

True: /opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions) 196 self.name = '<pexpect factory="" incomplete="">' factory incomplete>' 197 else: --> 198 self._spawn(command, args, preexec_fn, dimensions) 199 200 def __str__(self):

__str__(self): /opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawn(self, command, args, preexec_fn, dimensions) 296 297 self.ptyproc = self._spawnpty(self.args, env=self.env, --> 298 cwd=self.cwd, **kwargs) 299 300 self.pid = self.ptyproc.pid

self.ptyproc.pid /opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawnpty(self, args, *kwargs) **kwargs) 307 def _spawnpty(self, args, *kwargs): **kwargs): 308 '''Spawn a pty and return an instance of PtyProcess.''' --> 309 return ptyprocess.PtyProcess.spawn(args, **kwargs) 310 311 def close(self, force=True):

force=True): /opt/sagemath-8.1/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.py in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions) 218 219 if use_native_pty_fork: --> 220 pid, fd = pty.fork() 221 else: 222 # Use internal fork_pty, for Solaris

Solaris /opt/sagemath-8.1/local/lib/python2.7/pty.py in fork() 106 107 master_fd, slave_fd = openpty() --> 108 pid = os.fork() 109 if pid == CHILD: 110 # Establish a new session.

session. OSError: [Errno 11] Resource temporarily unavailable

unavailable

PackageNotFoundError and SyntaxError

In a notebook, when I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Does anyone know why am I getting these conflicting messages? I tried it both on a VirtualBox and Windows, but they both give the same messages.

EDIT: When I open a shell, there is a message on top saying

Starting subshell with Sage environment variable set. Don't forget to exit when you are done. Beware: * Do not do anything with other copies of Sage on your system. * Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell.

shell.

When I enter sage -i latte_int in anyway, I get

make: *** No rule to make target 'all-toolchain'.  Stop.

Typing sage -i latte_int in a terminal or console gives the same result.

Entering !sage -i latte_int in a Notebook, I get an OSError

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-f5647ef902a7> in <module>()
----> 1 get_ipython().system(u'sage -i latte_int')

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py in system_piped(self, cmd)
   2207         # a non-None value would trigger :func:`sys.displayhook` calls.
   2208         # Instead, we store the exit_code in user_ns.
-> 2209         self.user_ns['_exit_code'] = system(self.var_expand(cmd, depth=1))
   2210 
   2211     def system_raw(self, cmd):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/utils/_process_posix.py in system(self, cmd)
    155                 child = pexpect.spawnb(self.sh, args=['-c', cmd]) # Pexpect-U
    156             else:
--> 157                 child = pexpect.spawn(self.sh, args=['-c', cmd])  # Vanilla Pexpect
    158             flush = sys.stdout.flush
    159             while True:

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions)
    196             self.name = '<pexpect factory incomplete>'
    197         else:
--> 198             self._spawn(command, args, preexec_fn, dimensions)
    199 
    200     def __str__(self):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawn(self, command, args, preexec_fn, dimensions)
    296 
    297         self.ptyproc = self._spawnpty(self.args, env=self.env,
--> 298                                      cwd=self.cwd, **kwargs)
    299 
    300         self.pid = self.ptyproc.pid

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawnpty(self, args, **kwargs)
    307     def _spawnpty(self, args, **kwargs):
    308         '''Spawn a pty and return an instance of PtyProcess.'''
--> 309         return ptyprocess.PtyProcess.spawn(args, **kwargs)
    310 
    311     def close(self, force=True):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.py in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions)
    218 
    219         if use_native_pty_fork:
--> 220             pid, fd = pty.fork()
    221         else:
    222             # Use internal fork_pty, for Solaris

/opt/sagemath-8.1/local/lib/python2.7/pty.py in fork()
    106 
    107     master_fd, slave_fd = openpty()
--> 108     pid = os.fork()
    109     if pid == CHILD:
    110         # Establish a new session.

OSError: [Errno 11] Resource temporarily unavailable

PackageNotFoundError and SyntaxError

In a notebook, when I entered

p = Polyhedron(ieqs=[(0,1,0,0,0,0,0,0,0),(0,0,0,0,0,1,0,0,0),(0,-1,1,0,0,0,0,0,0),(0,0,-1,1,0,0,0,0,0),(0,0,0,-1,1,0,0,0,0),(0,0,0,0,-1,0,0,0,1),(0,0,0,0,0,-1,1,0,0),(0,0,0,0,0,0,-1,1,0),(0,0,0,0,0,0,0,-1,1),(1,-1,-1,-1,-1,-1,-1,-1,-1)])

and

H1 = Polyhedron(eqns=[(0,-1,0,0,0,1,0,0,0)])
q1 = p.intersection(H1)
q1.vertices()

everything was fine, but when I typed in

(1000*q1).integral_points_count()

I got the following message:

 --------------------------------------------------------------------------- PackageNotFoundError                  
 Traceback (most recent call last)
 <ipython-input-75-395b663ed32e> in
 <module>()
 ----> 1 (Integer(1000)*q1).integral_points_count()

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base_QQ.py
 in integral_points_count(self,
 verbose, use_Hrepresentation,
 explicit_enumeration_threshold,
 preprocess, **kwds)
     216                 cdd=True,
     217                 verbose=verbose,
 --> 218                 **kwds)

 /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/latte.py
 in count(arg, ehrhart_polynomial,
 multivariate_generating_function,
 raw_output, verbose, **kwds)
     148     except OSError:
     149         from sage.misc.package import PackageNotFoundError
 --> 150         raise PackageNotFoundError('latte_int')
     151 
     152     ans, err = latte_proc.communicate(arg)

 PackageNotFoundError: the package
 'latte_int' was not found. You can
 install it by running 'sage -i
 latte_int' in a shell

However, when I used sage -i latte_int, I got the error message

  File "<ipython-input-76-d56a71c64d98>", line 1
    sage -i latte_int
                    ^
SyntaxError: invalid syntax

Does anyone know why am I getting these conflicting messages? I tried it both on a VirtualBox and Windows, but they both give the same messages.

EDIT2: sage -i latte_int works in VirtualBox when typed in a terminal.

EDIT: When I open a shell, there is a message on top saying

Starting subshell with Sage environment variable set. Don't forget to exit when you are done. Beware: * Do not do anything with other copies of Sage on your system. * Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell.

When I enter sage -i latte_int in anyway, I get

make: *** No rule to make target 'all-toolchain'.  Stop.

Typing sage -i latte_int in a terminal or console gives the same result.

Entering !sage -i latte_int in a Notebook, I get an OSError

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-f5647ef902a7> in <module>()
----> 1 get_ipython().system(u'sage -i latte_int')

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py in system_piped(self, cmd)
   2207         # a non-None value would trigger :func:`sys.displayhook` calls.
   2208         # Instead, we store the exit_code in user_ns.
-> 2209         self.user_ns['_exit_code'] = system(self.var_expand(cmd, depth=1))
   2210 
   2211     def system_raw(self, cmd):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/utils/_process_posix.py in system(self, cmd)
    155                 child = pexpect.spawnb(self.sh, args=['-c', cmd]) # Pexpect-U
    156             else:
--> 157                 child = pexpect.spawn(self.sh, args=['-c', cmd])  # Vanilla Pexpect
    158             flush = sys.stdout.flush
    159             while True:

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions)
    196             self.name = '<pexpect factory incomplete>'
    197         else:
--> 198             self._spawn(command, args, preexec_fn, dimensions)
    199 
    200     def __str__(self):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawn(self, command, args, preexec_fn, dimensions)
    296 
    297         self.ptyproc = self._spawnpty(self.args, env=self.env,
--> 298                                      cwd=self.cwd, **kwargs)
    299 
    300         self.pid = self.ptyproc.pid

/opt/sagemath-8.1/local/lib/python2.7/site-packages/pexpect/pty_spawn.py in _spawnpty(self, args, **kwargs)
    307     def _spawnpty(self, args, **kwargs):
    308         '''Spawn a pty and return an instance of PtyProcess.'''
--> 309         return ptyprocess.PtyProcess.spawn(args, **kwargs)
    310 
    311     def close(self, force=True):

/opt/sagemath-8.1/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.py in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions)
    218 
    219         if use_native_pty_fork:
--> 220             pid, fd = pty.fork()
    221         else:
    222             # Use internal fork_pty, for Solaris

/opt/sagemath-8.1/local/lib/python2.7/pty.py in fork()
    106 
    107     master_fd, slave_fd = openpty()
--> 108     pid = os.fork()
    109     if pid == CHILD:
    110         # Establish a new session.

OSError: [Errno 11] Resource temporarily unavailable