Why I can't download Pypi even there shows no error?

image

Please don’t post screenshots of text; it’s much more readable for everyone if you instead copy and paste the text into a preformatted text block (see the </> button in the edit toolbar). If there is sensitive data in the text, you can do a simple text replacement to hide it.

You aren’t running pip install openpyxl, you’re running $pip install openpyxl. Since the pip variable is probably empty in your Bash session, what you’re actually running is install openpyxl. Remove the $ and openpyxl should be installed as expected :slight_smile:

3 Likes

A very common copy-and-paste error when following instructions from a guide, and the guide doesn’t separate out the prompt character from the command :slight_smile:

2 Likes

So many thanks for your suggestion and solution!! I just tried! But here I still can’t install it :frowning:
After entering pip install openpyxl
I got as below

(base) san@J-mac PycharmProjects % pip install openpyxl
Requirement already satisfied: openpyxl in /opt/anaconda3/lib/python3.8/site-packages (3.0.7)
Requirement already satisfied: et-xmlfile in /opt/anaconda3/lib/python3.8/site-packages (from openpyxl) (1.0.1)
(base) san@J-mac PycharmProjects % 

And when I check External Libraries.site-packages, there is still no ‘openpyxl’. There is still something wrong.

Sincere, thanks! Have a niiiiice day!

what are you typing in to do that and what does it show?

I ran pip install openpyxl

It shows as below

(base) san@J-mac PycharmProjects % pip install openpyxl 
Requirement already satisfied: openpyxl in /opt/anaconda3/lib/python3.8/site-packages (3.0.7) 
Requirement already satisfied: et-xmlfile in /opt/anaconda3/lib/python3.8/site-packages (from openpyxl) (1.0.1) 
(base) san@J-mac PycharmProjects %

I think I have not installed it successfully yet.

Question continued

Because I watched a tutorial video in which the teacher said if we had installed it successfully, normally we could find the python file at 「External Libraries, site-packages, openpyxl」

Sorry that the question is so long, and probably it’s too easy for you. Still so many thanks :wink:

“It’s supposed to appear here”… the screenshot is not useful as we do not see what is “here”. What is the directory?

It looks like you are combining:

  • multiple Python versions (3.8, 3.9)
  • multiple Python package installation tools (Linux distribution, pip, anaconda…)

This complicates things. It looks like you installed openpyxl for Python 3.8 but you probably use Python 3.9?


If you are going to use Python 3.9, use pip with this Python version:

python3.9 -m pip instrall openpyxl

On Linux do not try to install into system directories (directories not in your home) using other tools than the distribution ones (like apt or rpm). You can easily wreck your system for example by running pip with root privileges.