Although the earliest description of a bicycle like device is allegedly from Leonardo da Vinci in the late 1400's, the first bicycle like devices were popularised in the early 1800's after the "year without summer" killed a significant number of horses. (Don't forget that 1815 also marked the end of the Napoleonic wars and the end of the War of 1812, so horses were already in short supply).
This suggests that the key to developing mechanical transport would be a combination of factors, including the actual availability of roads, a population which was familiar with tools and some mechanical devices and a lack of animal or muscle powered transport due to some external factor like a massive volcanic eruption creating global cooling and massive crop failures.
Even then, people would also have had to have an actual need to get around. Most people never left their village or town unless they were either living by the coast or a navigable river, or had wanderlust or joined/were impressed by the local army. Most of the stuff you needed for day to day living was a short walk away.
An ancient army like the Roman Legions would have a much better chance of developing a bicycle like device under these circumstances, since they were well stocked with engineers and technical staffs, had access to roads and a need to get around quickly. Romans could and did make lots of mechanical devices, including things we would recognize as clockwork, war engines driven by tension or torsion to fling arrows and catapult stones and portable boats and bridges. By the first century AD simple heat engines were built as toys or automatic door openers at temples, so all that is really needed is a Hero of Alexandria to put his mind to transportation and it is conceivable that a device like the Draisine might have been invented. Couriers lacking horses would have been an obvious first use for these Draisines, and the practice would have spread from there (literally, as people would watch amazed as a courier sped past them at running speed without obviously expending running amounts of energy).