ImportError: cannot import name _remove_dead_weakref in django virtualenvInstalling python-pygments,...

What exploit Are these user agents trying to use?

How does a predictive coding aid in lossless compression?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Unlock My Phone! February 2018

Unable to supress ligatures in headings which are set in Caps

How to show a landlord what we have in savings?

Is "remove commented out code" correct English?

Alternative to sending password over mail?

Is it logically or scientifically possible to artificially send energy to the body?

How do conventional missiles fly?

In 'Revenger,' what does 'cove' come from?

Should I cover my bicycle overnight while bikepacking?

What are some good books on Machine Learning and AI like Krugman, Wells and Graddy's "Essentials of Economics"

What's the in-universe reasoning behind sorcerers needing material components?

Why didn't Boeing produce its own regional jet?

What does the expression "A Mann!" means

How to prevent "they're falling in love" trope

Expand and Contract

Ambiguity in the definition of entropy

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

What is a romance in Latin?

Why didn't Miles's spider sense work before?

Do UK voters know if their MP will be the Speaker of the House?

ssTTsSTtRrriinInnnnNNNIiinngg



ImportError: cannot import name _remove_dead_weakref in django virtualenv


Installing python-pygments, ImportErrorProblem with installing a python moduleI can't open software updater and unity tweak tool on Ubuntu14.04Error starting ipython?PlayOnLinux won't launchWhy can't I start onedrive-d?while creating module getting errorTypeError when running update-manager on ubuntu 17.10version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time referenceImportError: cannot import name _remove_dead_weakref?













0















After upgrade to 18.04 from 16.04, my django's virtualenv refuses to start:



(.djangoenv) mw@desktop:~/theapp$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 10, in <module>
from django.apps import apps
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/__init__.py", line 1, in <module>
from .config import AppConfig # NOQA
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/config.py", line 4, in <module>
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/exceptions.py", line 5, in <module>
from django.utils.encoding import force_text
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/encoding.py", line 10, in <module>
from django.utils.functional import Promise
File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/functional.py", line 1, in <module>
import copy
File "/usr/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref


On the djangoenv and outside it



$ python --version : 
`Python 2.7.12`


Hoping to resolve the issue, I also install Python 2.7.16 on the desktop, so I get:



$ python2.7 --version
Python 2.7.16


Answers to the same error in other contexts did not help and my search led to no more clues.
So really appreciate your hints.









share



























    0















    After upgrade to 18.04 from 16.04, my django's virtualenv refuses to start:



    (.djangoenv) mw@desktop:~/theapp$ python manage.py runserver
    Traceback (most recent call last):
    File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 10, in <module>
    from django.apps import apps
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/__init__.py", line 1, in <module>
    from .config import AppConfig # NOQA
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/config.py", line 4, in <module>
    from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/exceptions.py", line 5, in <module>
    from django.utils.encoding import force_text
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/encoding.py", line 10, in <module>
    from django.utils.functional import Promise
    File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/functional.py", line 1, in <module>
    import copy
    File "/usr/lib/python2.7/copy.py", line 52, in <module>
    import weakref
    File "/usr/lib/python2.7/weakref.py", line 14, in <module>
    from _weakref import (
    ImportError: cannot import name _remove_dead_weakref


    On the djangoenv and outside it



    $ python --version : 
    `Python 2.7.12`


    Hoping to resolve the issue, I also install Python 2.7.16 on the desktop, so I get:



    $ python2.7 --version
    Python 2.7.16


    Answers to the same error in other contexts did not help and my search led to no more clues.
    So really appreciate your hints.









    share

























      0












      0








      0








      After upgrade to 18.04 from 16.04, my django's virtualenv refuses to start:



      (.djangoenv) mw@desktop:~/theapp$ python manage.py runserver
      Traceback (most recent call last):
      File "manage.py", line 8, in <module>
      from django.core.management import execute_from_command_line
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 10, in <module>
      from django.apps import apps
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/__init__.py", line 1, in <module>
      from .config import AppConfig # NOQA
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/config.py", line 4, in <module>
      from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/exceptions.py", line 5, in <module>
      from django.utils.encoding import force_text
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/encoding.py", line 10, in <module>
      from django.utils.functional import Promise
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/functional.py", line 1, in <module>
      import copy
      File "/usr/lib/python2.7/copy.py", line 52, in <module>
      import weakref
      File "/usr/lib/python2.7/weakref.py", line 14, in <module>
      from _weakref import (
      ImportError: cannot import name _remove_dead_weakref


      On the djangoenv and outside it



      $ python --version : 
      `Python 2.7.12`


      Hoping to resolve the issue, I also install Python 2.7.16 on the desktop, so I get:



      $ python2.7 --version
      Python 2.7.16


      Answers to the same error in other contexts did not help and my search led to no more clues.
      So really appreciate your hints.









      share














      After upgrade to 18.04 from 16.04, my django's virtualenv refuses to start:



      (.djangoenv) mw@desktop:~/theapp$ python manage.py runserver
      Traceback (most recent call last):
      File "manage.py", line 8, in <module>
      from django.core.management import execute_from_command_line
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 10, in <module>
      from django.apps import apps
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/__init__.py", line 1, in <module>
      from .config import AppConfig # NOQA
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/apps/config.py", line 4, in <module>
      from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/core/exceptions.py", line 5, in <module>
      from django.utils.encoding import force_text
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/encoding.py", line 10, in <module>
      from django.utils.functional import Promise
      File "/home/mw/.djangoenv/local/lib/python2.7/site-packages/django/utils/functional.py", line 1, in <module>
      import copy
      File "/usr/lib/python2.7/copy.py", line 52, in <module>
      import weakref
      File "/usr/lib/python2.7/weakref.py", line 14, in <module>
      from _weakref import (
      ImportError: cannot import name _remove_dead_weakref


      On the djangoenv and outside it



      $ python --version : 
      `Python 2.7.12`


      Hoping to resolve the issue, I also install Python 2.7.16 on the desktop, so I get:



      $ python2.7 --version
      Python 2.7.16


      Answers to the same error in other contexts did not help and my search led to no more clues.
      So really appreciate your hints.







      18.04 upgrade python django virtualenv





      share












      share










      share



      share










      asked 2 mins ago









      MilkywayMilkyway

      111




      111






















          0






          active

          oldest

          votes












          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f1131044%2fimporterror-cannot-import-name-remove-dead-weakref-in-django-virtualenv%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131044%2fimporterror-cannot-import-name-remove-dead-weakref-in-django-virtualenv%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          List of shipwrecks in 1808...

          Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

          How do I enter a file or directory with special characters in its name?How to write the path of a folder with...