Python Forum
switch from version 3.5.3 to 3.8.6 get import error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switch from version 3.5.3 to 3.8.6 get import error
#2
What's your file structure? Where is replaceLineInFiles.py compared to the file you're running? You're correct, I wouldn't expect any major differences with how the imports are run.

How are you invoking the different versions of python? Is there any chance you have a wrapper for one of them that sets PYTHONPATH with the location of your module?

In both versions of python run:
import sys
print(sys.path)
Are they the same? Is the location of the module in the 3.5 path but not the 3.8 path?
Reply


Messages In This Thread
RE: switch from version 3.5.3 to 3.8.6 get import error - by bowlofred - Oct-30-2020, 05:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 7 6,878 Aug-03-2023, 06:00 PM
Last Post: Gribouillis
  import module error tantony 5 3,468 Dec-15-2022, 01:55 PM
Last Post: Lauraburmrs
  Cryptic Error with import statement Led_Zeppelin 2 2,560 Jan-11-2022, 01:13 PM
Last Post: Led_Zeppelin
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,678 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  best way to use switch case? korenron 8 3,029 Aug-18-2021, 03:16 PM
Last Post: naughtyCat
  import module with syntax error Skaperen 7 5,331 Jun-22-2021, 10:38 AM
Last Post: Skaperen
  Import Error Christian 3 3,215 Apr-17-2021, 11:27 PM
Last Post: bowlofred
  Error on Python Version? ErnestTBass 6 3,525 Dec-09-2020, 04:02 PM
Last Post: ErnestTBass
  Folium import error kashif_flavio 2 3,676 Dec-07-2020, 08:58 AM
Last Post: bowlofred
  Import error Beingcode 0 2,512 Nov-20-2020, 02:57 AM
Last Post: Beingcode

Forum Jump:

User Panel Messages

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