Talk:Welch's t-test: Difference between revisions

Line 1,303:
:Any chance a directory in the PYTHONPATH variable contains such files? The errors mean Python does not find the functions in modules 'string' and 'numpy' respectively. The file are found (otherwise you would get for instance ''ModuleNotFoundError: No module named 'string'''), but they do not contain what they should. There is another possibility: in Python 2, the 'string' module has a 'join' function, but not in Python 3. It should never happen, but if for some obscure reason you are running the Python 3 executable with a Python 2 library, it's not surprising you get errors. You could do 'python --version' in the console to see what you are actually running. But usually, this could not happen because Python will automatically look for the correct version of its library (may be possible to fool Python by setting some symlinks, or some other weird trick). You may also ask for help on Stack Overflow, where users of both Linux and Python may have a better answer than me (I work on Windows currently, and have not used Python 2 for years). If you try Stack Overflow, you may help by providing some information on your install, in addition to the error message: which Linux distribution, how you installed Python and numpy... But if you used the Linux package manager or Python's pip, and if you didn't do anything "by hand", the default install should be ok. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 23:27, 16 March 2018 (UTC)
::Ah, by the way: you renamed the numpy.py/scipy.py or other files you created, but you will also have to remove the pyc files: they are compiled Python files automatically created when you import a library (they may be in a subdirectory called '__pycache__', but IIRW with Python 2 they are in the same directory as the .py files - just have a look anyway). [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 23:32, 16 March 2018 (UTC)
:::Also, you write there is no num*/sci* file in your directory, but actually there should not be a string.py either, as it's what is causing a problem in your first error message. Check 'echo $PYTHONPATH', move to an empty directory, and retry to import some modules. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 23:42, 16 March 2018 (UTC)
1,336

edits