How to install cesiumpy

How to install cesiumpy
command: !pip install cesiumpy

error:

AttributeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 get_ipython().system(‘pip install cesiumpy’)

File /lib/python3.11/site-packages/IPython/core/interactiveshell.py:2629, in InteractiveShell.system_piped(self, cmd)
2624 raise OSError(“Background processes not supported.”)
2626 # we explicitly do NOT return the subprocess status code, because
2627 # a non-None value would trigger :func:sys.displayhook calls.
2628 # Instead, we store the exit_code in user_ns.
→ 2629 self.user_ns[‘_exit_code’] = system(self.var_expand(cmd, depth=1))

File /lib/python3.11/site-packages/IPython/utils/_process_posix.py:129, in ProcessHandler.system(self, cmd)
125 enc = DEFAULT_ENCODING
127 # Patterns to match on the output, for pexpect. We read input and
128 # allow either a short timeout or EOF
→ 129 patterns = [pexpect.TIMEOUT, pexpect.EOF]
130 # the index of the EOF pattern in the list.
131 # even though we know it’s 1, this call means we don’t have to worry if
132 # we change the above list, and forget to change this value:
133 EOF_index = patterns.index(pexpect.EOF)

AttributeError: module ‘pexpect’ has no attribute ‘TIMEOUT’

maybe your operating system is incompatible or needs some configuration changes…

what os are you using?

While it most likely won’t help at all in this case because you seem to be having additional issues with IPython and your system playing nicely, going forward you will have a better experience in modern Jupyter if you endeavor to use current best practices. Specifically, in regards to what I quote here, you should switch to using the magic variations of the install commands in all modern Jupyter, here that would be %pip install cesiumpy.

Use of an exclamation point with install commands doesn’t insure it installs to the correct environment. The magic variations of the install commands were added in 2019 to insure the installation occurs in the environment where the kernel is running that is backing the active .ipynb in which you run the installation, see here. More at top here about why the exclamation point for installations is deficient and can lead to issues.
(Additional tip: You can also sort of use this as a gauge to measure if documentation and advice are up-to-date with the current Jupyter ecosystem and be wary if it is not.)

1 Like