ImportError: cannot import name 'DependencyWarning' when trying to install a package called pybitflyer

Asked 2 years ago, Updated 2 years ago, 119 views

Prerequisites/What you want to achieve

I am trying to install a package called pybitflyer in python 3.6.3 (anaconda3).

(Reference)
"We created a package ""pybitflyer"" that allows you to use the bitFlyer Lightning API from Python."
http://wolfin.hatenablog.com/entry/2016/08/29/010112

Problems/Error Messages you are experiencing

 (C:\Users\keigo\Anaconda3) C:\Users\keigo> pip install pybitflyer
Traceback (most recent call last):
  File "C:\Users\keigo\Anaconda3\Scripts\pip-script.py", line 6, in <module>
    from pip import main
  File "C:\Users\keigo\Anaconda3\lib\site-packages\pip\_init__.py", line 21, in <module>
    from pip._vendor.requests.packages.urlib3. exceptions import DependencyWarning
ImportError: cannot import name 'DependencyWarning'

Tried

[Additional note]
I summarized that I tried to communicate with you in the comments

Try installing other packages

Unfortunately, I couldn't do other packages.Also, when I ran pip-v, it looked like the following:

Try uninstalling and reinstalling the pip itself

Installed. I thought it was shipped with python 3.6, but it may not have been included.

I tried pip after installing it, but I still got an error.

 (C:\Users\keigo\Anaconda3) C:\Users\keigo> pip install pybitflyer 
Traceback (most recent call last): File 
"C:\Users\keigo\Anaconda3\Scripts\pip-script.py", line 11, in <module> 
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')() 
"C:\Users\keigo\Anaconda3\lib\site-packages\pkg_resources_init_.py", 
line570, in load_entry_point return 
get_distribution(dist).load_entry_point(group,name)File 
"C:\Users\keigo\Anaconda3\lib\site-packages\pkg_resources_init_.py", 
line 2751, in load_entry_point return ep.load() File 
"C:\Users\keigo\Anaconda3\lib\site-packages\pkg_resources_init_.py", 
line 2405, in load return self.resolve() File 
"C:\Users\keigo\Anaconda3\lib\site-packages\pkg_resources_init_.py", 
line 2411, in resolve module=import__(self.module_name, fromlist=
['_name', level=0)File"C:\Users\keigo\Anaconda3\lib\site-
packages\pipe__init_.py", line 21, in<module>from 
pip._vendor.requests.packages.urllib3.exception import 
DependencyWarning ImportError: cannot import name 'DependencyWarning'

Supplementary information (e.g. language/FW/tool version)

python 3.6.3

python anaconda pip

2022-09-30 19:55

2 Answers

I can't reproduce it at hand, so I listed the items below that might help solve it.

Try raising the pip version

$pip install --upgrade pip

I want to update Python Tips:pipe itself

Try uninstalling and reinstalling the pip itself

$pip uninstall pip

$ easy_install pip

ImportError:cannot import name DependencyWarning#164


2022-09-30 19:55

It seems that the problem was that Python and anaconda were installed together.I organized the environment and solved it.

--This answer is Questioner's Comments.


2022-09-30 19:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.