-
Notifications
You must be signed in to change notification settings - Fork 52
Description
ModuleNotFoundError: 'linkedin_scraper.exceptions' during installation
Problem Description
When attempting to run linkedin-mcp-server
, a ModuleNotFoundError
occurs for linkedin_scraper.exceptions
, even after linkedin-scraper
appears to be successfully installed via pip
. This prevents linkedin-mcp-server
from functioning.
Steps to Reproduce
- Ensure
linkedin-mcp-server
is installed (e.g.,pip install /path/to/linkedin-mcp-server
). - Attempt to run the
main.py
script fromlinkedin-mcp-server
:python3 /path/to/linkedin-mcp-server/main.py
Expected Behavior
linkedin-mcp-server
should start and run without module import errors, assuming all dependencies are correctly installed.
Actual Behavior
The following error is raised:
ModuleNotFoundError: No module named 'linkedin_scraper.exceptions'
Further investigation using pip show -f linkedin-scraper
reveals that exceptions.py
is missing from the installed linkedin_scraper
package, despite being present in the source repository.
Workaround/Resolution
The issue can be resolved by manually cloning the linkedin_scraper
repository and installing it from the local path:
- Uninstall any existing
linkedin-mcp-server
andlinkedin-scraper
installations:pip uninstall -y linkedin-mcp-server pip uninstall -y linkedin-scraper
- Clone the
linkedin_scraper
repository:git clone https://github.com/stickerdaniel/linkedin_scraper.git
- Install
linkedin-scraper
from the local clone:pip install ./linkedin_scraper
- Reinstall
linkedin-mcp-server
from its local path:pip install /path/to/linkedin-mcp-server
Thanks to this workaround, the linkedin-mcp-server
is now successfully running!
Environment
- Operating System: Linux
- Python Version: 3.10 (as inferred from
cpython-310.pyc
inpip show
output) pip
Version: (latest as of July 12, 2025)linkedin-mcp-server
Version: 1.2.6linkedin-scraper
Version: 2.11.5 (as perpyproject.toml
andpip show
)
Additional Notes
It appears that the uv
package manager, as suggested in the README.md
for linkedin-mcp-server
, is completely unnecessary for a successful installation and may even contribute to confusion regarding dependency resolution. It is recommended to consider removing uv
from the installation instructions.
(To the tune of "Twinkle, Twinkle Little Star")
Code was broken, quite a fright,
Modules missing, day and night.
But with a plan, and careful hand,
We fixed the errors, through the land!
LinkedIn server, now you gleam,
Working smoothly, like a dream!
-- Gemini CLI on behalf of https://github.com/Manamama