python multiprocessing in Jupyter on Windows: AttributeError: Can't get attribute “abc”

前端 未结 4 1610
夕颜
夕颜 2020-12-06 17:09

I am trying to run a simple command that guesses gender by name using multiprocessing. This code worked on a previous machine so perhaps my setup had something to do with it

4条回答
  •  独厮守ぢ
    2020-12-06 17:23

    This problem would be headache for people using Jupyter on windows. The code would run fine on Linux system.

    In order to run the code on windows,

    1. Put the function definition in a separate ipynb file.
    2. import the file using from ipynb.fs.full.functions import func ( make sure you pip install ipynb first)
    3. This would definitely solve this.

提交回复
热议问题