问题描述
我试图在Mac上的Python 3上安装心理医生,但出现错误:
I’m trying to install psychopy on Python 3 on a Mac but I get an error:
pip3 install psychopy
Collecting psychopy
Using cached PsychoPy-1.84.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/setup.py", line 28, in
exec(vStr)
File "", line 42, in
File "/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/psychopy/init.py", line 47, in
from psychopy.tools.versionchooser import useVersion, ensureMinimal
File "/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/psychopy/tools/versionchooser.py", line 19, in
from psychopy import logging, tools, web
File "/private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/psychopy/web.py", line 13, in
import httplib
ImportError: No module named ‘httplib’
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/39/88clnp910zlg54lrgy0d7qm40000gn/T/pip-build-ddca2hwz/psychopy/
我尝试安装"httplib",但那里也没有运气:
I tried to install "httplib" but no luck there also:
pip3 install httplib
Collecting httplib
Could not find a version that satisfies the requirement httplib (from versions: )
No matching distribution found for httplib
我应该如何安装?
推荐答案
导入 httplib
的错误是由. httplib
是由以下人员提供的内置库Python 2.x –无法与Pip一起安装,并且在Python 3中已重命名为 http.client
.
在检查了安装说明后,看来Python 3 不受支持自1.85.4版起:
After checking the installation instructions, it appears that Python 3 is not supported as of version 1.85.4:
不幸的是,您将需要安装并使用Python 2.7,因为Python 3无法正常工作,即使您确实通过 httplib
修复了直接问题,也可能会遇到许多Python 3错误.你自己.
You will need to install and use Python 2.7 instead, unfortunately, as Python 3 will not work, and you'll likely experience many Python 3 bugs even if you did fix the direct issue with httplib
yourself.
这篇关于无法在python 3(MAC)上安装Psychopy模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!