Python ModuleNotFoundError:没有名为';PIL';

Python ModuleNotFoundError:没有名为';PIL';,python,linux,Python,Linux,系统信息:Ubuntu 18.04.4 LTS(GNU/Linux 4.15.0-88-generic x86_64) Python告诉我安装的模块是: trever@server:~/$ sudo pip3 install --target=/usr/local/lib/python3.8/site-packages Pillow WARNING: The directory '/home/trever/.cache/pip' or its parent directory is not ow

系统信息:Ubuntu 18.04.4 LTS(GNU/Linux 4.15.0-88-generic x86_64)

Python告诉我安装的模块是:

trever@server:~/$ sudo pip3 install --target=/usr/local/lib/python3.8/site-packages Pillow
WARNING: The directory '/home/trever/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Pillow
  Downloading Pillow-7.0.0-cp36-cp36m-manylinux1_x86_64.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 6.8 MB/s 
Installing collected packages: Pillow
Successfully installed Pillow-7.0.0
trever@server:~/$ python StartDatascraper.py 
Traceback (most recent call last):
  File "StartDatascraper.py", line 1, in <module>
    import modules.only as onlyfans
  File "/home/trever/Only/modules/only.py", line 2, in <module>
    from modules.helpers import get_directory, json_request, reformat, format_directory, format_media_set, export_archive, format_image
  File "/home/trever/Only/modules/helpers.py", line 6, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'
trever@server:~/OnlyFans$ cd /usr/local/lib/python3.8
trever@server:/usr/local/lib/python3.8$ ls
dist-packages  site-packages
trever@server:/usr/local/lib/python3.8$ cd site-packages/
trever@server:/usr/local/lib/python3.8/site-packages$ 
trever@server:/usr/local/lib/python3.8/site-packages$ ls
PIL  Pillow-7.0.0.dist-info
编辑1:

trever@server:~$ python -c 'import sys;print(sys.path)'
['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
编辑2: 我注意到这是python3.6,而不是python3.8

trever@server:~$ sudo pip3 install Pillow
[sudo] password for trever: 

WARNING: The directory '/home/trever/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Pillow in /usr/local/lib/python3.6/dist-packages (7.0.0)

编辑3:

trever@server:~$ type python
python is hashed (/usr/bin/python)
编辑4:

trever@server:~$ sudo /usr/bin/python -m pip install Pillow
/usr/bin/python: No module named pip

“python StartDatascraper.py”您确定python是python3吗?在我的debian上是python2.7,我将我的设置为Python3.8.2。python——版本输出Python3.8.2抱歉,我没有看到可以运行
python-c'import sys;print(sys.path)
?@Philippe我做了,在编辑1'python StartDatascraper.py'下,你确定python是python3吗?在我的debian上是python2.7,我将我的设置为Python3.8.2。python——版本输出Python3.8.2抱歉,我没有看到可以运行
python-c'import sys;打印(sys.path)
?@Philippe我做了,在编辑1下
trever@server:~$ sudo /usr/bin/python -m pip install Pillow
/usr/bin/python: No module named pip