2

I am trying to install Python's cryptacular package but keep running into an error:

Without sudo:

$ pip install cryptacular
Collecting cryptacular
  Using cached https://files.pythonhosted.org/packages/ec/d6/a82d191ec058314b2b7cbee5635150f754ba1c6ffc05387bc9a57efe48b8/cryptacular-1.5.5.tar.gz
    Complete output from command python setup.py egg_info:
    Collecting enscons
      Using cached https://files.pythonhosted.org/packages/e3/e4/7dcc4bc0893d82479a7a8b77e19cf4bc15862962f63c4a800ac655467552/enscons-0.23.0-py2.py3-none-any.whl
    Collecting scons>=3.0.5 (from enscons)
      Using cached https://files.pythonhosted.org/packages/90/ff/01a273c627f48079285a8be6bf4aadb95d6d6c1793c114c6876fc28aab5c/scons-3.1.2-py2.py3-none-any.whl
    Collecting pytoml>=0.1 (from enscons)
      Using cached https://files.pythonhosted.org/packages/a5/47/c7f8a0f210ad18576840922e0b504f0b7f5f73aea4a52ab14c5b58517edf/pytoml-0.1.21-py2.py3-none-any.whl
    Collecting wheel (from enscons)
      Using cached https://files.pythonhosted.org/packages/81/44/db78754a73d9a88c5bd1bb692b40004410970e88aa0c5dff20b57f231505/wheel-0.34.1-py2.py3-none-any.whl
    Collecting attrs (from enscons)
      Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
    Collecting setuptools (from enscons)
      Using cached https://files.pythonhosted.org/packages/f9/d3/955738b20d3832dfa3cd3d9b07e29a8162edb480bf988332f5e6e48ca444/setuptools-44.0.0-py2.py3-none-any.whl
    Installing collected packages: scons, pytoml, wheel, attrs, setuptools, enscons
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 360, in run
        prefix=options.prefix_path,
      File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
        **kwargs
      File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 851, in install
        self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
      File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
        isolated=self.isolated,
      File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 247, in move_wheel_files
        prefix=prefix,
      File "/usr/lib/python2.7/dist-packages/pip/locations.py", line 153, in distutils_scheme
        i.finalize_options()
      File "/usr/lib/python2.7/distutils/command/install.py", line 289, in finalize_options
        raise DistutilsOptionError("can't combine user with prefix, "
    DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-pY1I05/cryptacular/setup.py", line 13, in <module>
        "-t", "setup-requires"] + requires)
      File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', 'install', '-t', 'setup-requires', 'enscons']' returned non-zero exit status 2

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-pY1I05/cryptacular/

Now, I tried with sudo because I have no idea how to fix the above error. But then (yes, you guessed it) I get another error:

$ sudo pip install cryptacular
The directory '/home/bob/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pi
p with sudo, you may want sudo's -H flag.
The directory '/home/bob/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with 
sudo, you may want sudo's -H flag.
Collecting cryptacular
  Downloading https://files.pythonhosted.org/packages/ec/d6/a82d191ec058314b2b7cbee5635150f754ba1c6ffc05387bc9a57efe48b8/cryptacular-1.5.5.tar.gz
Requirement already satisfied: pbkdf2 in /usr/local/lib/python2.7/dist-packages (from cryptacular)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from cryptacular)
Installing collected packages: cryptacular
  Running setup.py install for cryptacular ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nS5oQT/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
 '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-u5UBdD-record/install-record.txt --single-version-externally-managed --compile:
    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons: Building targets ...
    scons: *** Do not know how to make File target `install' (/tmp/pip-build-nS5oQT/cryptacular/install).  Stop.
    scons: building terminated because of errors.

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nS5oQT/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(co
mpile(code, __file__, 'exec'))" install --record /tmp/pip-u5UBdD-record/install-record.txt --single-version-externally-managed --compile" failed with error code 2 in /tmp/pip-build-nS5oQT/cryptacular/

I really have no idea what to do to resolve and solve this bugging issue.

1 Answer 1

2

The first error is a wart of cryptacular: it tries to install enscons using pip install -t regardless of the current pip options. I recommend to report the bug to the issue tracker.

To work around the problem try to install enscons manually before installing cryptacular:

pip install enscons
pip install cryptacular

The second bug is already reported in November and doesn't receive any answer yet.

Sign up to request clarification or add additional context in comments.

3 Comments

both links are broken
@tribbloid The answer was given 11 months ago. Things are changing quite fast.
I've come across this exact issue in Debian 19, Py3.7, pip install cryptacular errors with "Failed building wheel for cryptacular ... scons: building terminated because of errors". Still trying to solve…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.