Use vagrant as interpreter is not working
PyCharm 2023.2.1 (Professional Edition)
Vagrant 2.3.7
This is how I set the interpreter from vagrant, everythings looks fine, and I run the code inside the pycharm like:
if __name__ == '__main__':
print('hello')
I got
sys.path.extend(['/tmp/x7X0ZeFi7c/'])
PyDev console: starting.
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
runfile('/tmp/x7X0ZeFi7c/test.py', wdir='/tmp/x7X0ZeFi7c/')
Traceback (most recent call last):
File "/home/vagrant/.pycharm_helpers/pydev/pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "/home/vagrant/.pycharm_helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/home/vagrant/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 11, in execfile
stream = tokenize.open(file) # @UndefinedVariable
File "/usr/lib/python3.8/tokenize.py", line 392, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: ‘/tmp/x7X0ZeFi7c/test.py’
How to make it work as PHPStorm.
Please sign in to leave a comment.