Can't install cryosparc-tools

Hi,

When I attempt to installl cryosparc-tools on v4.2.x, I get the attached error from pip. How do I get around this?

Cheers
Oli

user@c112384:~$ pip install cryosparc-tools
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 257, in run
    with self._build_session(options) as session:
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'int' object has no attribute 'endswith'
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 220, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 251, in main
    timeout=min(5, options.timeout)) as session:
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'int' object has no attribute 'endswith'

I believe you’re trying to install it using legacy python2.7, whereas the github says that it’s compatible with python >= 3.7.

I’d try the following:

python3 --vesrion

and if it’s greated than 3.7, do

python3 -m pip install cryosparc-tools

If no, you can create an environment with a specific python version using conda (e.g. here) and then install it to this environment.

1 Like

Ah yes should have thought of that! Works like a charm

1 Like