unpy.py", heat 174, in _run_module_as_main "__main__", fname, loader, pkg_name) document "c:python27lib
unpy.py", line 72, in _run_code exec code in run_globals paper "C:python27ToolsScriptspip.exe\__main__.py", heat 5, in record "c:python27libsite-packagespip\__init__.py", line 5, in income logging record "c:python27liblogging\__init__.py", line 26, in import sys, os, time, cStringIO, traceback, warnings, weakref, collections document "c:python27libweakref.py", heat 14, in native _weakref import (ImportError: cannot import name _remove_dead_weakref
python pip pywin32
improve this concern
edited Mar 8 "18 at 7:04
86622 gold badges1111 silver badges2626 bronze badges
inquiry Mar 8 "18 at 6:37
Ravi KRavi K
16511 yellow badge11 silver badge1212 bronze badges
add a comment |
2 answer 2
energetic earliest Votes
I have encountered the similar issue on my macOS X as soon as I operation lldb from the terminal. The error blog post is the following,
16:55 $ lldbTraceback (most recent call last):File "", heat 1, in record "/usr/local/Cellar/python
2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in import weakrefFile "/usr/local/Cellar/python
2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in native _weakref income (ImportError: cannot import name _remove_dead_weakrefThe error message is quite comparable with yours. This is what I fixed on my macOS X.
$ brew list...python
$ brew eliminate python
2 --ignore-dependenciesUninstalling /usr/local/Cellar/python
2/2.7.14_3... (4,662 files, 82.8MB)I think the difficulty is caused by the system installed python, which problems with personally mounted python. After I removed my python2.7 and lldb functions well. Ns hope that will give you some idea, although we room running top top a different OS.
To regulate different variation of python, ns recommend girlfriend to download pyenv, watch here. The can easily switch the various versions of your python.
enhance this price
edited Mar 4 "19 in ~ 10:15
answered might 1 "18 at 9:12
35511 silver- badge88 bronze badges
add a comment |
I"m pretty sure the reason for this error is just how you"re installation python and also that you"ve most likely duplicated your environment from somewhere else .. Or you"re renaming folders .. Or you"ve one invalid python environment in your environmental path.
You are watching: Importerror: cannot import name _remove_dead_weakref
If you"re looking come copy the python folder about, don"t download it "for all users" .. Simply install the to her folder for her "logged in user only".
So her solution have to be eitherinstall python again pointing to your location c:python27orinstall python utilizing the "install simply for this user" .. Then copy from it to her c:python27 .. You might be interested in pipenv and virtualenv (google search for them)
Also, you can run pip making use of
python -m pip install This is the same as to run
pip.exe install You could try using the full path for python to see if it runs pip ok.eg. C:python27python.exe -m pip install
improve this prize
edited may 21 "18 in ~ 20:13
answered might 21 "18 in ~ 20:08
17611 silver- badge1010 bronze title
add a comment |
Thanks because that contributing response to ridge Overflow!Please be sure to answer the question. Provide details and share your research!
But avoid …Asking because that help, clarification, or responding to other answers.Making statements based on opinion; back them increase with recommendations or personal experience.
To learn more, check out our advice on writing an excellent answers.
See more: Subway 6&Quot; Rotisserie-Style Chicken, 6 Grams Of Fat Or Less
Sign up or log in in
authorize up making use of Google
authorize up making use of Facebook
authorize up making use of Email and also Password
Post as a guest
email Required, but never shown
Post as a guest
Required, but never shown
write-up Your prize Discard
Not the prize you're feather for? Browse other questions tagged python pip pywin32 or ask your very own question.
The Overflow Blog
Featured ~ above Meta
I can't uncover the code of a Ruby net application
The command '/bin/sh -c pip download -r requirements.txt' reverted a non-zero code: 1
How can I safely develop a nested directory?
go Python have actually a ternary conditional operator?
exactly how to acquire the current time in Python
how do i concatenate two lists in Python?
how to update all Python packages with pip
go Python have actually a cable 'contains' substring method?
How have the right to I install pip ~ above Windows?
How have the right to I install packages utilizing pip follow to the requirements.txt document from a regional directory?
ImportError: Cannot import name X
Error after upgrading pip: cannot income name 'main'
warm Network concerns more hot concerns
subscribe to RSS
question feed To i ordered it to this RSS feed, copy and also paste this URL into your RSS reader.
stack Exchange Network
site architecture / logo © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.12.22.41046