Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use ProcessPool in pycharm on windows #197

Open
Blanket58 opened this issue Aug 18, 2020 · 0 comments
Open

Can't use ProcessPool in pycharm on windows #197

Blanket58 opened this issue Aug 18, 2020 · 0 comments

Comments

@Blanket58
Copy link

Blanket58 commented Aug 18, 2020

When I type the following in pycharm console, it comes with os error, but everything is normal under cmd and ipython, I've been struggling with this problem for a long time.

from pathos.multiprocessing import ProcessPool

ProcessPool(2)
<pool ProcessPool(ncpus=2)>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Python\lib\site-packages\multiprocess\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "D:\Python\lib\site-packages\multiprocess\spawn.py", line 114, in _main
    prepare(preparation_data)
  File "D:\Python\lib\site-packages\multiprocess\spawn.py", line 225, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "D:\Python\lib\site-packages\multiprocess\spawn.py", line 277, in _fixup_main_from_path
    run_name="__mp_main__")
  File "D:\Python\lib\runpy.py", line 261, in run_path
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    code, fname = _get_code_from_file(run_name, path_name)
  File "D:\Python\lib\runpy.py", line 231, in _get_code_from_file
    with open(fname, "rb") as f:
OSError: [Errno 22] Invalid argument: 'D:\\myworkspace\\<input>'

My working environment:
python 3.7.7 64bit
windows10 x64
pycharm 2019.3.5 pro
pathos 0.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant