Python Poetry - Having Trouble with Working in the Virtual Environment

Viewed 859

I installed Poetry the other day and everything went well. I created a project and was able to use the Poetry commands to do things inside of the venv. Then, I created a new project just to try something out with affecting my current (more important) project. Since that time, I cannot use the Poetry venv (poetry shell) to do anything in any new project, yet it still works perfectly when I go back to my main project. I'm thankful for that, but want to figure out what is happening for future use. Below are a couple of the things I tried inside of the venv of a new directory created with Poetry. Any ideas as to what might be going wrong. I even uninstalled and reinstalled it, and keep getting the same errors. Thanks for your time.

The virtual environment found in /home/jesse/.cache/pypoetry/virtualenvs/demo-OhcC5qq9-py3.8 seems to be broken.
Recreating virtualenv demo-OhcC5qq9-py3.8 in /home/jesse/.cache/pypoetry/virtualenvs/demo-OhcC5qq9-py3.8

  FileNotFoundError

  [Errno 2] No such file or directory: '/home/jesse/.cache/pypoetry/virtualenvs/demo-OhcC5qq9-py3.8/bin/python3'

  at ~/.poetry/lib/poetry/_vendor/py3.8/virtualenv/discovery/builtin.py:61 in propose_interpreters
       57│ def propose_interpreters(spec, app_data):
       58│     # 1. if it's a path and exists
       59│     if spec.path is not None:
       60│         try:
    →  61│             os.lstat(spec.path)  # Windows Store Python does not work with os.path.exists, but does for os.lstat
       62│         except OSError:
       63│             if spec.is_abs:
       64│                 raise
       65│         else:
(demo-OhcC5qq9-py3.8) jesse@superuser:~/demo$ poetry add requests

  FileNotFoundError

  [Errno 2] No such file or directory: 'python'

  at /usr/lib/python3.8/subprocess.py:1702 in _execute_child
      1698│                     else:
      1699│                         err_filename = orig_executable
      1700│                     if errno_num != 0:
      1701│                         err_msg = os.strerror(errno_num)
    → 1702│                     raise child_exception_type(errno_num, err_msg, err_filename)
      1703│                 raise child_exception_type(err_msg)
      1704│
      1705│
      1706│         def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
'''
0 Answers
Related