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
pycharm 下运行demo.py error ,ValueError: cannot find context for 'forkserver' ,pytorch-gpu,windows10 #195
Comments
最后用python demo.py --indir ${img_directory} --outdir examples/res --sp在cmd中科院运行 也是看了 您的win_install 现在问题是:难道在pycharm下报错要怎么解决这个问题? |
pycharm其实和命令行没有什么区别,只不过pycharm是一个IDE罢了。 看你的问题应该是没有添加参数运行,建议去查一下运行脚本如何配置参数。 或者,去修改demo.py将一些选项的默认值写成你想要的。 |
好的 非常谢谢您的回复 我去试一试 |
已经解决了 |
|
我也是同样问题,请问解决了吗? |
|
Set the sp true in Alphapose/opt.py file. |
really Thankyou |
感谢您的工作,谢谢分享!
我是在windows 10 环境下,pytorch-gpu,在pycharm打开运行demo.py
遇到错误是:ValueError: cannot find context for 'forkserver'
报错如下:
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\my-pytorch-gpu\lib\multiprocessing\context.py", line 190, in get_context
ctx = _concrete_contexts[method]
KeyError: 'forkserver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:/PythonProject/Alphapose/AlphaPose-pytorch/AlphaPose-pytorch/demo.py", line 26, in
torch.multiprocessing.set_start_method('forkserver', force=True)
File "D:\ProgramData\Anaconda3\envs\my-pytorch-gpu\lib\multiprocessing\context.py", line 246, in set_start_method
self._actual_context = self.get_context(method)
File "D:\ProgramData\Anaconda3\envs\my-pytorch-gpu\lib\multiprocessing\context.py", line 238, in get_context
return super().get_context(method)
File "D:\ProgramData\Anaconda3\envs\my-pytorch-gpu\lib\multiprocessing\context.py", line 192, in get_context
raise ValueError('cannot find context for %r' % method)
ValueError: cannot find context for 'forkserver'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: