3

I am working with a Python virtual environment on a Windows machine. I used venv with Python 3.10 to create the environment and pip to install libraries. I have used this environment successfully with Jupyter Lab - launching it from the command line.

(as an aside, I then installed a separate Python 3.7 virtual environment that I used with PyCharm. The following error began after that action).

I now get the following error when I launch Jupyter Lab:

(extractpdf) C:\venv\extractpdf>jupyter lab
No pyvenv.cfg file

The above directory (C:\venv\extractpdf) does in fact contain a pyvenv.cfg file with the following content, which looks as expected according to this answer:

home = C:\Python310
include-system-site-packages = false
version = 3.10.1

I deleted the virtual environment, reinstalled Python 3.10.1, and recreated the virtual environment, while this error persists.


This error is occurring with my virtual environments, even when a pyvenv.cfg file exists. The following system interpreters do not have a pyvenv.cfg file.

My Python 3.7 system interpreter gives this error:

C:\Python37>python
No pyvenv.cfg file

while my Python 3.10 system interpreter does not produce an error.

C:\Python310>python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
mbela
  • 31
  • 1
  • 4

0 Answers0