CA
Crawlee & Apifyโ€ข12mo ago
correct-apricot

Unable to setup apify actor using python-scrapy template in Windows

Hi Team, I'm new to Apify. I'm trying to setup Apify actor using python-scrapy template. But I'm getting following error.
C:\Users\Guest User\Desktop>apify create my-actor -t python-scrapy
Info: Making sure that Apify CLI is up to date...
Info: Apify CLI is up to date ๐Ÿ‘

Info: Python version 3.11.4 detected.
Info: Creating a virtual environment in "C:\Users\Guest User\Desktop\my-actor\.venv" and installing dependencies from "requirements.txt"...
Run: python -m venv --prompt . .venv
Run: C:\Users\Guest User\Desktop\my-actor\.venv\Scripts\python.exe -m pip install --no-cache-dir --no-warn-script-location --upgrade pip setuptools wheel
'C:\Users\Guest' is not recognized as an internal or external command,
operable program or batch file.
Error: C:\Users\Guest User\Desktop\my-actor\.venv\Scripts\python.exe exited with code 1
C:\Users\Guest User\Desktop>apify create my-actor -t python-scrapy
Info: Making sure that Apify CLI is up to date...
Info: Apify CLI is up to date ๐Ÿ‘

Info: Python version 3.11.4 detected.
Info: Creating a virtual environment in "C:\Users\Guest User\Desktop\my-actor\.venv" and installing dependencies from "requirements.txt"...
Run: python -m venv --prompt . .venv
Run: C:\Users\Guest User\Desktop\my-actor\.venv\Scripts\python.exe -m pip install --no-cache-dir --no-warn-script-location --upgrade pip setuptools wheel
'C:\Users\Guest' is not recognized as an internal or external command,
operable program or batch file.
Error: C:\Users\Guest User\Desktop\my-actor\.venv\Scripts\python.exe exited with code 1
Any thoughts?
1 Reply
Mantisus
Mantisusโ€ข12mo ago
Hey @Nayananga The error occurs because of the Windows username - Guest User the command line script is executed incorrectly due to the presence of a space. You can create a template manually from the github repository - https://github.com/apify/actor-templates/tree/master/templates/python-scrapy
GitHub
actor-templates/templates/python-scrapy at master ยท apify/actor-tem...
This project is the :house: home of Apify actor template projects to help users quickly get started. - apify/actor-templates

Did you find this page helpful?