Search code examples
python-3.xtwistedpipenv-install

There is Error While Installing twisted in pipenv


I was trying to install twisted in pipenv for my project But I came across this error I will be thanked if anyone help me. I am using python=3.8.2

I install the package by this command:

pipenv install twisted

Here's the error

Installing twisted…
Adding twisted to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (f7d8de) out of date, updating to (fcb166)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Success!
Updated Pipfile.lock (f7d8de)!
Installing dependencies from Pipfile.lock (f7d8de)…
An error occurred while installing clx==0.0.1 --hash=sha256:2ade62ba519b37da57b7b1f84b51dc6af12fc40fba78955184b1b02762e92396! Will try again.
An error occurred while installing twisted[tls]==20.3.0 --hash=sha256:040eb6641125d2a9a09cf198ec7b83dd8858c6f51f6770325ed9959c00f5098f --hash=sha256:147780b8caf21ba2aef3688628eaf13d7e7fe02a86747cd54bfaf2140538f042 --hash=sha256:158ddb80719a4813d292293ac44ba41d8b56555ed009d90994a278237ee63d2c --hash=sha256:2182000d6ffc05d269e6c03bfcec8b57e20259ca1086180edaedec3f1e689292 --hash=sha256:25ffcf37944bdad4a99981bc74006d735a678d2b5c193781254fbbb6d69e3b22 --hash=sha256:3281d9ce889f7b21bdb73658e887141aa45a102baf3b2320eafcfba954fcefec --hash=sha256:356e8d8dd3590e790e3dba4db139eb8a17aca64b46629c622e1b1597a4a92478 --hash=sha256:70952c56e4965b9f53b180daecf20a9595cf22b8d0935cd3bd664c90273c3ab2 --hash=sha256:7408c6635ee1b96587289283ebe90ee15dbf9614b05857b446055116bc822d29 --hash=sha256:7c547fd0215db9da8a1bc23182b309e84a232364cc26d829e9ee196ce840b114 --hash=sha256:894f6f3cfa57a15ea0d0714e4283913a5f2511dbd18653dd148eba53b3919797 --hash=sha256:94ac3d55a58c90e2075c5fe1853f2aa3892b73e3bf56395f743aefde8605eeaa --hash=sha256:a58e61a2a01e5bcbe3b575c0099a2bcb8d70a75b1a087338e0c48dd6e01a5f15 --hash=sha256:c09c47ff9750a8e3aa60ad169c4b95006d455a29b80ad0901f031a103b2991cd --hash=sha256:ca3a0b8c9110800e576d89b5337373e52018b41069bc879f12fa42b7eb2d0274 --hash=sha256:cd1dc5c85b58494138a3917752b54bb1daa0045d234b7c132c37a61d5483ebad --hash=sha256:cdbc4c7f0cd7a2218b575844e970f05a1be1861c607b0e048c9bceca0c4d42f7 --hash=sha256:d267125cc0f1e8a0eed6319ba4ac7477da9b78a535601c49ecd20c875576433a --hash=sha256:d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10 --hash=sha256:d95803193561a243cb0401b0567c6b7987d3f2a67046770e1dccd1c9e49a9780 --hash=sha256:e92703bed0cc21d6cb5c61d66922b3b1564015ca8a51325bd164a5e33798d504 --hash=sha256:f058bd0168271de4dcdc39845b52dd0a4a2fecf5f1246335f13f5e96eaebb467 --hash=sha256:f3c19e5bd42bbe4bf345704ad7c326c74d3fd7a1b3844987853bef180be638d4! Will try again.
  ================================ 35/35 - 00:01:09
Installing initially failed dependencies…
     ================================ 2/2 - 00:00:36
[pipenv.exceptions.InstallError]:   File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\cli\command.py", line 235, in install
[pipenv.exceptions.InstallError]:       retcode = do_install(
[pipenv.exceptions.InstallError]:   File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1983, in do_install
[pipenv.exceptions.InstallError]:       do_init(
[pipenv.exceptions.InstallError]:   File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1246, in do_init
[pipenv.exceptions.InstallError]:       do_install_dependencies(
[pipenv.exceptions.InstallError]:   File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 862, in do_install_dependencies
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, False, failed_deps_queue, retry=False)
[pipenv.exceptions.InstallError]:   File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting clx==0.0.1', '  Using cached clx-0.0.1.tar.gz (1.1 kB)', 'Building wheels for collected packages: clx', '  Building wheel for clx (setup.py): started', "  Building wheel for clx (setup.py): finished with status 'error'", '  Running setup.py clean for clx', 'Failed to build clx', 'Installing collected packages: clx', '    Running setup.py install for clx: started', "    Running setup.py install for clx: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', '   command: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d \'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-wheel-fsi8qkme\'', '       cwd: C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\', '  Complete output (25 lines):', '  running bdist_wheel', '  running build', '  installing to build\\bdist.win32\\wheel', '  running install', '  Traceback (most recent call last):', '    File "<string>", line 1, in <module>', '    File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 18, in <module>', '      setup(name=pkg,', '    File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\setuptools\\__init__.py", line 144, in setup', '      return distutils.core.setup(**attrs)', '    File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\core.py", line 148, in setup', '      dist.run_commands()', '    File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 966, in run_commands', '      self.run_command(cmd)', '    File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\wheel\\bdist_wheel.py",
line 259, in run', "      self.run_command('install')", '    File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\cmd.py", line 313, in run_command', '      self.distribution.run_command(command)', '    File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 15, in run', '      raise Exception(long_description)', '  Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.', '  ----------------------------------------', '  ERROR: Failed building wheel for clx', '    ERROR: Command errored out with exit status 1:',
'     command: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record \'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-record-y6sug7_2\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\include\\site\\python3.8\\clx\'', '         cwd: C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\', '    Complete output (16 lines):', '    running install', '
 Traceback (most recent call last):', '      File "<string>", line 1, in <module>', '      File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 18, in <module>', '        setup(name=pkg,', '      File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\setuptools\\__init__.py", line 144, in setup', '        return distutils.core.setup(**attrs)', '      File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\core.py", line 148, in setup', '        dist.run_commands()', '      File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 966, in run_commands', '        self.run_command(cmd)', '      File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 15, in run', '        raise Exception(long_description)', '    Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.', '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record \'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-record-y6sug7_2\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\include\\site\\python3.8\\clx\' Check the logs for full command output.']
ERROR: ERROR: Package installation failed...




Solution

  • I've successfully installed twisted on a Colab running Python 3.6. There are one, maybe two, issues ATM:

    1. Right now, your issue is that your install is trying to pip install a now conda only packaged called clx.

    Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.

    However, twisted has no requirements for clx that I can see, so I'm not sure where your error is coming from with your given information. twisted also installs just fine, as shown in the Colab here: https://colab.research.google.com/drive/1aXn-kuMyMWLRcQs_-BRfI98iLe8cH5fL?usp=sharing.

    1. Not sure is this is a blocker yet, but you also may want to use Python 3.5/3.6/3.7 as per twisted's install requirements -> https://github.com/twisted/twisted/blob/trunk/INSTALL.rst.

    If you are, as per your error message, trying to install and use the RAPIDS CLX package somewhere, your issue is that you're trying to pip install CLX. CLX needs to be installed via conda.

    Please

    1. Ensure that you have or install the minimal conda installation with Miniconda or get the full installation with Anaconda
    2. Install python 3.7
    3. Install CLX with conda install -c rapidsai clx
    4. Retry your installation

    Maybe just doing that will remove the error and you can proceed in happiness.