I can't install hashlib manually

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I'm not sure why, but when I'm installing hashlib, it gives me an error. I've already tried a good number of potential solutions, and I'd appreciate any help.



$ pip install --user hashlib
Collecting hashlib
Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/home/tania/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
File "/home/tania/anaconda3/lib/python3.6/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/home/tania/anaconda3/lib/python3.6/email/feedparser.py", line 27, in <module>
from email._policybase import compat32
File "/home/tania/anaconda3/lib/python3.6/email/_policybase.py", line 9, in <module>
from email.utils import _has_surrogates
File "/home/tania/anaconda3/lib/python3.6/email/utils.py", line 28, in <module>
import random
File "/home/tania/anaconda3/lib/python3.6/random.py", line 46, in <module>
from hashlib import sha512 as _sha512
File "/tmp/pip-install-vm0l089t/hashlib/hashlib.py", line 80
raise ValueError, "unsupported hash type"
^
SyntaxError: invalid syntax


Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vm0l089t/hashlib/






share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm not sure why, but when I'm installing hashlib, it gives me an error. I've already tried a good number of potential solutions, and I'd appreciate any help.



    $ pip install --user hashlib
    Collecting hashlib
    Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
    File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
    File "/home/tania/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 36, in <module>
    import email.parser
    File "/home/tania/anaconda3/lib/python3.6/email/parser.py", line 12, in <module>
    from email.feedparser import FeedParser, BytesFeedParser
    File "/home/tania/anaconda3/lib/python3.6/email/feedparser.py", line 27, in <module>
    from email._policybase import compat32
    File "/home/tania/anaconda3/lib/python3.6/email/_policybase.py", line 9, in <module>
    from email.utils import _has_surrogates
    File "/home/tania/anaconda3/lib/python3.6/email/utils.py", line 28, in <module>
    import random
    File "/home/tania/anaconda3/lib/python3.6/random.py", line 46, in <module>
    from hashlib import sha512 as _sha512
    File "/tmp/pip-install-vm0l089t/hashlib/hashlib.py", line 80
    raise ValueError, "unsupported hash type"
    ^
    SyntaxError: invalid syntax


    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vm0l089t/hashlib/






    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm not sure why, but when I'm installing hashlib, it gives me an error. I've already tried a good number of potential solutions, and I'd appreciate any help.



      $ pip install --user hashlib
      Collecting hashlib
      Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 12, in <module>
      import setuptools.version
      File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/version.py", line 1, in <module>
      import pkg_resources
      File "/home/tania/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 36, in <module>
      import email.parser
      File "/home/tania/anaconda3/lib/python3.6/email/parser.py", line 12, in <module>
      from email.feedparser import FeedParser, BytesFeedParser
      File "/home/tania/anaconda3/lib/python3.6/email/feedparser.py", line 27, in <module>
      from email._policybase import compat32
      File "/home/tania/anaconda3/lib/python3.6/email/_policybase.py", line 9, in <module>
      from email.utils import _has_surrogates
      File "/home/tania/anaconda3/lib/python3.6/email/utils.py", line 28, in <module>
      import random
      File "/home/tania/anaconda3/lib/python3.6/random.py", line 46, in <module>
      from hashlib import sha512 as _sha512
      File "/tmp/pip-install-vm0l089t/hashlib/hashlib.py", line 80
      raise ValueError, "unsupported hash type"
      ^
      SyntaxError: invalid syntax


      Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vm0l089t/hashlib/






      share|improve this question














      I'm not sure why, but when I'm installing hashlib, it gives me an error. I've already tried a good number of potential solutions, and I'd appreciate any help.



      $ pip install --user hashlib
      Collecting hashlib
      Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 12, in <module>
      import setuptools.version
      File "/home/tania/anaconda3/lib/python3.6/site-packages/setuptools/version.py", line 1, in <module>
      import pkg_resources
      File "/home/tania/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 36, in <module>
      import email.parser
      File "/home/tania/anaconda3/lib/python3.6/email/parser.py", line 12, in <module>
      from email.feedparser import FeedParser, BytesFeedParser
      File "/home/tania/anaconda3/lib/python3.6/email/feedparser.py", line 27, in <module>
      from email._policybase import compat32
      File "/home/tania/anaconda3/lib/python3.6/email/_policybase.py", line 9, in <module>
      from email.utils import _has_surrogates
      File "/home/tania/anaconda3/lib/python3.6/email/utils.py", line 28, in <module>
      import random
      File "/home/tania/anaconda3/lib/python3.6/random.py", line 46, in <module>
      from hashlib import sha512 as _sha512
      File "/tmp/pip-install-vm0l089t/hashlib/hashlib.py", line 80
      raise ValueError, "unsupported hash type"
      ^
      SyntaxError: invalid syntax


      Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vm0l089t/hashlib/








      share|improve this question













      share|improve this question




      share|improve this question








      edited May 19 at 23:14









      Chai T. Rex

      3,45611132




      3,45611132










      asked May 19 at 22:59









      Tan

      1




      1




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote














          can't install hashlib manually



          $ pip install --user hashlib




          Note1 : pip is usually a python2 command.



          Note2 : A contemporary "hashlib" is present by default:



          $ locate hashlib.py
          /snap/core/4486/usr/lib/python3.5/hashlib.py
          /snap/core/4571/usr/lib/python3.5/hashlib.py
          /snap/pulsemixer/23/usr/lib/python3.5/hashlib.py
          /snap/pulsemixer/8/usr/lib/python3.5/hashlib.py
          /snap/software-boutique/31/usr/lib/python3.5/hashlib.py
          /snap/ubuntu-mate-welcome/169/usr/lib/python3.5/hashlib.py
          /usr/lib/python2.7/hashlib.py
          /usr/lib/python2.7/hashlib.pyc
          /usr/lib/python3.6/hashlib.py


          Hashlib-2008 : Like the name says → year 2008: Files that old will often fail with gcc-7.



          Manually : Get hashlib-20081119.zip https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip



          Example with Ubuntu 18.04 and python2 ( Fails with python3 ):



          sudo apt install g++ g++-5

          unzip hashlib-20081119.zip
          cd hashlib-20081119/
          export CC=gcc-5 && python setup.py build && sudo python setup.py install
          .
          .
          Writing /usr/local/lib/python2.7/dist-packages/hashlib-20081119.egg-info





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038220%2fi-cant-install-hashlib-manually%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote














            can't install hashlib manually



            $ pip install --user hashlib




            Note1 : pip is usually a python2 command.



            Note2 : A contemporary "hashlib" is present by default:



            $ locate hashlib.py
            /snap/core/4486/usr/lib/python3.5/hashlib.py
            /snap/core/4571/usr/lib/python3.5/hashlib.py
            /snap/pulsemixer/23/usr/lib/python3.5/hashlib.py
            /snap/pulsemixer/8/usr/lib/python3.5/hashlib.py
            /snap/software-boutique/31/usr/lib/python3.5/hashlib.py
            /snap/ubuntu-mate-welcome/169/usr/lib/python3.5/hashlib.py
            /usr/lib/python2.7/hashlib.py
            /usr/lib/python2.7/hashlib.pyc
            /usr/lib/python3.6/hashlib.py


            Hashlib-2008 : Like the name says → year 2008: Files that old will often fail with gcc-7.



            Manually : Get hashlib-20081119.zip https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip



            Example with Ubuntu 18.04 and python2 ( Fails with python3 ):



            sudo apt install g++ g++-5

            unzip hashlib-20081119.zip
            cd hashlib-20081119/
            export CC=gcc-5 && python setup.py build && sudo python setup.py install
            .
            .
            Writing /usr/local/lib/python2.7/dist-packages/hashlib-20081119.egg-info





            share|improve this answer


























              up vote
              1
              down vote














              can't install hashlib manually



              $ pip install --user hashlib




              Note1 : pip is usually a python2 command.



              Note2 : A contemporary "hashlib" is present by default:



              $ locate hashlib.py
              /snap/core/4486/usr/lib/python3.5/hashlib.py
              /snap/core/4571/usr/lib/python3.5/hashlib.py
              /snap/pulsemixer/23/usr/lib/python3.5/hashlib.py
              /snap/pulsemixer/8/usr/lib/python3.5/hashlib.py
              /snap/software-boutique/31/usr/lib/python3.5/hashlib.py
              /snap/ubuntu-mate-welcome/169/usr/lib/python3.5/hashlib.py
              /usr/lib/python2.7/hashlib.py
              /usr/lib/python2.7/hashlib.pyc
              /usr/lib/python3.6/hashlib.py


              Hashlib-2008 : Like the name says → year 2008: Files that old will often fail with gcc-7.



              Manually : Get hashlib-20081119.zip https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip



              Example with Ubuntu 18.04 and python2 ( Fails with python3 ):



              sudo apt install g++ g++-5

              unzip hashlib-20081119.zip
              cd hashlib-20081119/
              export CC=gcc-5 && python setup.py build && sudo python setup.py install
              .
              .
              Writing /usr/local/lib/python2.7/dist-packages/hashlib-20081119.egg-info





              share|improve this answer
























                up vote
                1
                down vote










                up vote
                1
                down vote










                can't install hashlib manually



                $ pip install --user hashlib




                Note1 : pip is usually a python2 command.



                Note2 : A contemporary "hashlib" is present by default:



                $ locate hashlib.py
                /snap/core/4486/usr/lib/python3.5/hashlib.py
                /snap/core/4571/usr/lib/python3.5/hashlib.py
                /snap/pulsemixer/23/usr/lib/python3.5/hashlib.py
                /snap/pulsemixer/8/usr/lib/python3.5/hashlib.py
                /snap/software-boutique/31/usr/lib/python3.5/hashlib.py
                /snap/ubuntu-mate-welcome/169/usr/lib/python3.5/hashlib.py
                /usr/lib/python2.7/hashlib.py
                /usr/lib/python2.7/hashlib.pyc
                /usr/lib/python3.6/hashlib.py


                Hashlib-2008 : Like the name says → year 2008: Files that old will often fail with gcc-7.



                Manually : Get hashlib-20081119.zip https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip



                Example with Ubuntu 18.04 and python2 ( Fails with python3 ):



                sudo apt install g++ g++-5

                unzip hashlib-20081119.zip
                cd hashlib-20081119/
                export CC=gcc-5 && python setup.py build && sudo python setup.py install
                .
                .
                Writing /usr/local/lib/python2.7/dist-packages/hashlib-20081119.egg-info





                share|improve this answer















                can't install hashlib manually



                $ pip install --user hashlib




                Note1 : pip is usually a python2 command.



                Note2 : A contemporary "hashlib" is present by default:



                $ locate hashlib.py
                /snap/core/4486/usr/lib/python3.5/hashlib.py
                /snap/core/4571/usr/lib/python3.5/hashlib.py
                /snap/pulsemixer/23/usr/lib/python3.5/hashlib.py
                /snap/pulsemixer/8/usr/lib/python3.5/hashlib.py
                /snap/software-boutique/31/usr/lib/python3.5/hashlib.py
                /snap/ubuntu-mate-welcome/169/usr/lib/python3.5/hashlib.py
                /usr/lib/python2.7/hashlib.py
                /usr/lib/python2.7/hashlib.pyc
                /usr/lib/python3.6/hashlib.py


                Hashlib-2008 : Like the name says → year 2008: Files that old will often fail with gcc-7.



                Manually : Get hashlib-20081119.zip https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip



                Example with Ubuntu 18.04 and python2 ( Fails with python3 ):



                sudo apt install g++ g++-5

                unzip hashlib-20081119.zip
                cd hashlib-20081119/
                export CC=gcc-5 && python setup.py build && sudo python setup.py install
                .
                .
                Writing /usr/local/lib/python2.7/dist-packages/hashlib-20081119.egg-info






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 20 at 13:47

























                answered May 20 at 13:17









                Knud Larsen

                1,441157




                1,441157






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038220%2fi-cant-install-hashlib-manually%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491