Jun-15-2020, 03:40 AM
(This post was last modified: Jun-15-2020, 03:49 AM by acollins555.)
I have Anaconda3 running with Python 3.6.10 and everything works fine. I was able to use Spyder to write and test the code. I can also run simple one file script like "hello world" from the command prompt.
Now I want to run this program that I wrote from the Anaconda Powershell Prompt without the overhead of Spyder debugger. I have 4 files and they are all in the same directory. 3 of the files are imported into the file where main() resides. In my file with main(), called xscan.py, I try to do "from xtree import ...." where xtree.py is the file with other code I get ImportError. Obviously Anaconda is not looking in the local Windows folder for these files. I did try sys.path.append in xscan.py but that didn't do any good. What do I have to do to run this program from the Anaconda command prompt? Thanks.
Removing .py suffix fixed it.
Now I want to run this program that I wrote from the Anaconda Powershell Prompt without the overhead of Spyder debugger. I have 4 files and they are all in the same directory. 3 of the files are imported into the file where main() resides. In my file with main(), called xscan.py, I try to do "from xtree import ...." where xtree.py is the file with other code I get ImportError. Obviously Anaconda is not looking in the local Windows folder for these files. I did try sys.path.append in xscan.py but that didn't do any good. What do I have to do to run this program from the Anaconda command prompt? Thanks.
Removing .py suffix fixed it.