Python Forum
Syntax errors: Struggling to setup enviroment and load packages
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax errors: Struggling to setup enviroment and load packages
#4
(Jun-25-2021, 02:04 PM)AH56 Wrote: I need to downgrade to 3.8 to fix this, but now need to create a virtual eviroment that has both 3.8 in it, and flickr_Scraper. How do I do this on cmder? Cheers.
You don't need to downgrade just install Python 3.8 and do not add it to PATH.
Python 3.9/3.8 and pip installation under Windows
Then can use py to access Python 3.8.
Here is the start then the other commands is the same
# Make environment with Python 3.8 
G:\div_code\py -3.8 -m venv flick38_env

G:\div_code
λ cd flick38_env\

G:\div_code\flick38_env
λ G:\div_code\flick38_env\Scripts\activate

(flick38_env) G:\div_code\flick38_env
λ cd flickr_scraper\
.....
Can do a test to see it works.
(flick38_env) G:\div_code\flick38_env\flickr_scraper (master)
λ python flickr_scraper.py --search "bees" --n 10 --download
0/10 https://live.staticflickr.com/5537/14142817779_8786627929_o.jpg
1/10 https://live.staticflickr.com/829/41747732682_f4f10ec204_o.jpg
2/10 https://live.staticflickr.com/1662/23809746334_c22950a054_o.jpg
3/10 https://live.staticflickr.com/4094/4822128168_415b5ce1e4_o.jpg
4/10 https://farm6.staticflickr.com/5511/12638717365_7643b6e19a_b.jpg
5/10 https://live.staticflickr.com/961/27921370568_0795b91dfb_o.jpg
6/10 https://farm2.staticflickr.com/1646/26540040015_54f071db32_b.jpg
7/10 https://farm8.staticflickr.com/7377/26868463353_6da2da165d_b.jpg
8/10 https://farm8.staticflickr.com/7595/17187249975_b1ccddea5f_b.jpg
9/10 https://farm2.staticflickr.com/1578/26186589965_678bd3c5a4_b.jpg
Some points if search has more than one work use double quote and not single.
python flickr_scraper.py --search "honeybees on flowers" --n 10 --download
I have to use Ctrl+c to stop it get out.
Reply


Messages In This Thread
RE: Syntax errors: Struggling to setup enviroment and load packages - by snippsat - Jun-25-2021, 02:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Struggling with Juggling JSON Data SamWatt 7 3,227 May-09-2022, 02:49 AM
Last Post: snippsat
  Struggling for the past hour to define function and call it back godlyredwall 2 3,040 Oct-29-2020, 02:45 PM
Last Post: deanhystad
  struggling with != statements CallumRoberts2004 2 2,216 Aug-18-2020, 03:01 PM
Last Post: GOTO10
  I’m Flat out struggling to understand list indexes gr3yali3n 7 4,190 Jul-20-2020, 07:18 PM
Last Post: princetonits
  Struggling with nested list gr3yali3n 3 3,153 Jul-09-2020, 05:30 PM
Last Post: DPaul
  Struggling to exit this while loop fatherted99 5 3,613 Feb-08-2020, 07:46 PM
Last Post: fatherted99
  Pip Syntax Errors in CMD: Windows 10 and Python 3.8.1 jamesphopper 2 5,858 Feb-08-2020, 07:21 PM
Last Post: jamesphopper
  Struggling with several while loops nsadams87xx 1 2,460 Nov-25-2019, 02:12 AM
Last Post: Larz60+
  struggling with loop/webscrape zarize 4 3,665 Sep-27-2019, 08:44 AM
Last Post: zarize
  Still struggling with np.where... pberrett 1 2,767 May-10-2019, 11:30 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020