我正在尝试安装和使用Evernote模块(https://github.com/evernote/evernote-sdk-python).我跑了pip install evernote,它说安装工作.
我可以确认evernote模块存在于/usr/local/lib/python2.7/site-packages.但是,当我尝试运行时,python -c "import evernote"我收到以下错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named evernote
Run Code Online (Sandbox Code Playgroud)
这是我的内容.bash-profile:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Setting PATH for Python 3.3
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.3/bin:${PATH}"
export PATH
export PATH=$PATH:/usr/local/bin/
Run Code Online (Sandbox Code Playgroud)
我与安装的其他模块有同样的问题pip.救命?
编辑:我是一个超级新手,并没有编辑该.bash-profile文件.
编辑:python -c 'import …
我正在尝试编写一个函数,该函数不仅可以确定集合子集的总和是否会添加到所需的目标编号,还可以打印作为解决方案的子集.
这是我的代码,用于查找是否存在子集:
def subsetsum(array,num):
if num == 0 or num < 1:
return False
elif len(array) == 0:
return False
else:
if array[0] == num:
return True
else:
return subsetsum(array[1:],(num - array[0])) or subsetsum(array[1:],num)
Run Code Online (Sandbox Code Playgroud)
如何修改它以记录子集本身,以便我可以打印它?提前致谢!