安装tweet-preprocessor 0.4.0时遇'python setup.py egg_info'错误代码1求助
Hey there, let's work through this installation error together. The python setup.py egg_info failure typically stems from outdated packaging tools, missing dependencies, or environment misconfiguration. Given your Windows 10, Python 3.6.2, and pip 9.0.1 setup, here are targeted fixes to try:
Step 1: Upgrade pip and setuptools
Your pip version (9.0.1) is quite outdated, and older versions often struggle with modern package setup files. Run this command to upgrade both tools (use py -3.6 to explicitly target your Python 3.6 installation):
py -3.6 -m pip install --upgrade pip setuptools
Step 2: Install the wheel package
Many Python packages require wheel to build and install properly. Install it with:
pip install wheel
If you run into path-related issues, use the full path to your pip executable:
c:\python\python36-32\Scripts\pip install wheel
Step 3: Try installing with elevated permissions
Windows file permissions can sometimes block writes to the site-packages directory. Open Command Prompt as Administrator, then run the installation command again:
pip install tweet-preprocessor==0.4.0
Step 4: Verify your environment path
Double-check that you're using the correct pip associated with your Python 3.6.2 installation. Run this command to confirm:
pip --version
The output should point to c:\python\python36-32\lib\site-packages (Python 3.6). If not, use the full path to your pip executable for the installation:
c:\python\python36-32\Scripts\pip install tweet-preprocessor==0.4.0
Step 5: Test with the latest version of tweet-preprocessor
If installing version 0.4.0 still fails, try installing the latest version first to rule out version-specific compatibility issues:
pip install tweet-preprocessor
If that works, you can attempt downgrading to 0.4.0 with:
pip install tweet-preprocessor==0.4.0
内容的提问来源于stack exchange,提问作者Bilal Butt

