Details
Description
There are conflict in two cases:
1. random module is used by pyspark.mllib.feature, if the first part of sys.path is not '', then the hack in pyspark/_init_.py will fail to fix the conflict.
2. Run tests in mllib/xxx.py, the '' should be popped out before import anything, or it will fail.
The first one is not fully fixed for user, it will introduce problems in some cases, such as:
>>> import sys >>> import sys.insert(0, PATH_OF_MODULE) >>> import pyspark >>> # use Word2Vec will fail
I'd like to rename mllib/random.py as random/random.py, then in mllib/_init.py
import pyspark.mllib._random as random
Attachments
Issue Links
- is duplicated by
-
SPARK-3662 Importing pandas breaks included pi.py example
- Resolved
- links to