Issue on importing Python Library
Background
- I am on MacOS 10.14.5.
- I currently cannot import any Python third-party Library from anywhere (including VSCode, Pycharm and terminal).
Detail
- For example, I have been using
pip3 install pandasto download the Python Library:
pip3 list
Package Version
----------------- --------
astroid 2.2.5
beautifulsoup4 4.7.1
certifi 2019.3.9
chardet 3.0.4
idna 2.8
isort 4.3.16
lazy-object-proxy 1.3.1
mccabe 0.6.1
numpy 1.16.4
panda 0.3.1
pandas 0.25.0
- However, I just cannot import it:
python3
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas
- (Same problem exists in any other editor)
Also, when I am trying to install Libraries by Pycharm, it reports:
Collecting pandas
Could not install packages due to an EnvironmentError: Missing dependencies for SOCKS support.
However, even after turning off the proxy, the problem still exists.
If there is any other operations needed for diagnosis, please tell me! Thanks for helping!
pip show pandas Name: pandas Version: 0.25.0 Summary: Powerful data structures for data analysis, time series, and statistics Home-page: http://pandas.pydata.org Author: None Author-email: None License: BSD Location: /usr/local/lib/python3.7/site-packages Requires: pytz, numpy, python-dateutil Required-by:
– yChen Sep 01 '19 at 07:42... print(path) File "", line 2
print(path)
^
IndentationError: expected an indented block
– yChen Sep 01 '19 at 07:42