Salesforce Python SDK似乎已正确安装在virtenv中:
(venv-python3) pixmaclt61:venv-python3 ddow$ sudo easy_install salesforce-python-sdk
Searching for salesforce-python-sdk
Best match: salesforce-python-sdk 0.1.3
Processing salesforce_python_sdk-0.1.3-py3.5.egg
salesforce-python-sdk 0.1.3 is already the active version in easy-install.pth
Using /Users/ddow/venv-python3/lib/python3.5/site-packages/salesforce_python_sdk-0.1.3-py3.5.egg
Processing dependencies for salesforce-python-sdk
Finished processing dependencies for salesforce-python-sdk
但是当我尝试导入它时:
ddow$ python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import salesforce
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ddow/venv-python3/lib/python3.5/site-packages/salesforce_python_sdk-0.1.3-py3.5.egg/salesforce/__init__.py", line 1, in <module>
File "/Users/ddow/venv-python3/lib/python3.5/site-packages/salesforce_python_sdk-0.1.3-py3.5.egg/salesforce/api.py", line 1, in <module>
ImportError: No module named 'salesforceSoapApi'
我已经检查了该模块,它看起来像是在那里:
ddow$ cd salesforce
(venv-python3) pixmaclt61:salesforce ddow$ ls
__init__.py exception.py sObject.py salesforceSoapApi.py version.py
__pycache__ httpClient.py salesforceApi.py urlResources.py
api.py login.py salesforceRestApi.py utils.py
请帮忙吗? :d
谢谢,
丹