即使安装了pycurl,Python也会抛出错误

时间:2018-01-12 22:59:59

标签: python

我看到pycurl安装的时候但是当我运行一个有pycurl的脚本时会抛出错误ImportError: No module named pycurl

安装了pycurl

 users-iMac:clone_radar user$ sudo pip install pycurl
    The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels 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: pycurl in /Users/user/Library/Python/2.7/lib/python/site-packages

错误: -

users-iMac:clone_radar user$ python ./cloneradar.py username 4364_test radar.py
Traceback (most recent call last):
  File "./cloneradar.py", line 7, in <module>
    from RadarWS import RadarWS
  File "/Users/user/Documents/cloning_radar/com/clone_radar/RadarWS.py", line 28, in <module>
    import pycurl
ImportError: No module named pycurl

如果我尝试在没有sudo的情况下安装,我会收到错误

Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/fh/1g80t0p942bf8_pnjjl8r21m0000gn/T/pip-build-QmeyZh/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/fh/1g80t0p942bf8_pnjjl8r21m0000gn/T/pip-4p7wF2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/fh/1g80t0p942bf8_pnjjl8r21m0000gn/T/pip-build-QmeyZh/pycurl

0 个答案:

没有答案
相关问题