如何安装Evernote Python SDK?安装遇报错求助
Hey there, let's work through these two Evernote SDK installation issues step by step:
1. Fixing the SyntaxError: keyword argument repeated from python setup.py install
This error pops up because the exclude parameter in the find_packages call (line 22 of setup.py) has duplicate patterns and messy formatting (like extra spaces in the strings).
Solution:
Open the setup.py file from the Evernote SDK source code you downloaded, find line 22, and clean up the exclude list to remove duplicates and extra spaces. For example, change this:
packages=find_packages('lib',exclude=[" .thrift", " .thrift. ", "thrift. ", "thrift"]),
To this cleaner version:
packages=find_packages('lib', exclude=["*.thrift", "thrift.*", "thrift"]),
Save the file, then re-run python setup.py install—the syntax error should be gone.
2. Fixing Could not find a version that satisfies the requirement evernote from pip install evernote
The PyPI package for Evernote is no longer maintained, so pip can't find a compatible version for modern Python releases (like 3.8+).
Solution:
Install directly from the official GitHub repository instead:
- Clone the SDK repo first:
git clone https://github.com/evernote/evernote-sdk-python.git
- Navigate into the cloned directory:
cd evernote-sdk-python
- Apply the
setup.pyfix from the first issue above, then run the install command:
python setup.py install
A quick heads-up: If you're using Python 3.8 or newer, you might need to tweak a few lines of the SDK code for compatibility (like updating outdated syntax), but this will get you past the installation block.
内容的提问来源于stack exchange,提问作者jerry_




