i am getting below error, I have actually search lot approximately but haven"t to be able to discover a great fix- you re welcome anyone that was obtaining this type of error and also resolved. You re welcome help.

File "c:python27lib 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
re-publishing
improve this concern
follow
edited Mar 8 "18 at 7:04

*

Anuraag Baishya
86622 gold badges1111 silver badges2626 bronze badges
inquiry Mar 8 "18 at 6:37
*

Ravi KRavi K
16511 yellow badge11 silver badge1212 bronze badges
5
add a comment |

2 answer 2


energetic earliest Votes
9
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.


share
enhance this price
monitor
edited Mar 4 "19 in ~ 10:15
answered might 1 "18 at 9:12
*

HeefanHeefan
35511 silver- badge88 bronze badges
1
add a comment |
1
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 either

install 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


share
improve this prize
monitor
edited may 21 "18 in ~ 20:13
answered might 21 "18 in ~ 20:08
*

BrianBrian
17611 silver- badge1010 bronze title
1
add a comment |

her Answer


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


Draft saved
Draft discarded

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
send

Post as a guest


surname
email Required, but never shown


Post as a guest


surname
email

Required, but never shown


write-up Your prize Discard

By click “Post your Answer”, friend agree come our regards to service, privacy policy and also cookie plan


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
Linked
0
I can't uncover the code of a Ruby net application
1
The command '/bin/sh -c pip download -r requirements.txt' reverted a non-zero code: 1
connected
5034
How can I safely develop a nested directory?
7094
go Python have actually a ternary conditional operator?
3424
exactly how to acquire the current time in Python
3164
how do i concatenate two lists in Python?
2425
how to update all Python packages with pip
3592
go Python have actually a cable 'contains' substring method?
2660
How have the right to I install pip ~ above Windows?
1388
How have the right to I install packages utilizing pip follow to the requirements.txt document from a regional directory?
652
ImportError: Cannot import name X
502
Error after upgrading pip: cannot income name 'main'
warm Network concerns more hot concerns

inquiry feed
subscribe to RSS
question feed To i ordered it to this RSS feed, copy and also paste this URL into your RSS reader.


*

lang-py
ridge Overflow
products
firm
stack Exchange Network
site architecture / logo © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.12.22.41046


Stack Overflow works best with JavaScript allowed
*

your privacy

By click “Accept all cookies”, girlfriend agree stack Exchange can store cookie on your machine and disclose info in accordance through our Cookie Policy.