You need to make sure that you're launching the standalone project with Python 3. If you are submitting your standalone program through spark-submit then it should work fine, but if you are using python to launch, use python3 to start your program.
Also, keep in mind that you have to set your env variables in ./conf/spark-env.sh (if it doesn't exist you can use spark-env.sh.template as a base).