Post History
Hello everyone, I am encountering an issue when running pytest in my virtual environment. Although I have installed the required modules in my virtual environment using pip, I am still getting a M...
#4: Post edited
- Hello everyone,
I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager to stop seeing this errors. But this only works with popular packages since all of them aren't available on the package manager.- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
In summary I would like to install globally only pytest while all other packages are installed on the virtual environment. And I want to know how to use the global pytest from the virtual environment without getting any errors.- Thank you in advance for the help.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
- ```
- Hello everyone,
- I am encountering an issue when running pytest in my virtual environment. Although I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager to stop seeing these errors. However, this only works with popular packages since not all of them are available on the package manager.
- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
- In summary, I would like to install only pytest globally while all other packages are installed in the virtual environment. And I want to know how to use the global pytest from the virtual environment without getting any errors.
- Thank you in advance for the help.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
- ```
#3: Post edited
- Hello everyone,
- I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager to stop seeing this errors. But this only works with popular packages since all of them aren't available on the package manager.
- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
```I would appreciate any help in resolving this issue and being able to use the pytest version from the package manager while in the virtual environment. Thank you in advance.
- Hello everyone,
- I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager to stop seeing this errors. But this only works with popular packages since all of them aren't available on the package manager.
- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
- In summary I would like to install globally only pytest while all other packages are installed on the virtual environment. And I want to know how to use the global pytest from the virtual environment without getting any errors.
- Thank you in advance for the help.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
- ```
#2: Post edited
- Hello everyone,
I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager, but this only works with popular packages since all of them aren't available on the package manager.- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
- ```
- I would appreciate any help in resolving this issue and being able to use the pytest version from the package manager while in the virtual environment. Thank you in advance.
- Hello everyone,
- I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager to stop seeing this errors. But this only works with popular packages since all of them aren't available on the package manager.
- As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment.
- Here is the output of `pip freeze` in my virtual environment:
- ```
- venv ❯ pip freeze
- backoff==2.2.1
- certifi==2023.5.7
- charset-normalizer==3.2.0
- feedparser==6.0.10
- idna==3.4
- pythorhead==0.12.3
- requests==2.31.0
- schedule==1.2.0
- sgmllib3k==1.0.0
- urllib3==2.0.3
- ```
- And here is the error I am getting when running pytest:
- ```
- venv ❯ pytest my_module.py
- E ModuleNotFoundError: No module named 'schedule'
- ```
- I would appreciate any help in resolving this issue and being able to use the pytest version from the package manager while in the virtual environment. Thank you in advance.
#1: Initial revision
Getting a Module Error When Running Pytest Even Though the Module is Installed in the Current Virtual Environment
Hello everyone, I am facing an issue when running pytest in my virtual environment. Even though I have installed the required modules in my virtual environment using pip, I am still getting a ModuleNotFoundError when running pytest. I had to install some packages globally using the package manager, but this only works with popular packages since all of them aren't available on the package manager. As a workaround, I had to uninstall pytest from the package manager and install it in the virtual environment. However, I would prefer to use the pytest from the package manager since it makes sense to me to install a package I use often globally instead of installing it in each virtual environment. Here is the output of `pip freeze` in my virtual environment: ``` venv ❯ pip freeze backoff==2.2.1 certifi==2023.5.7 charset-normalizer==3.2.0 feedparser==6.0.10 idna==3.4 pythorhead==0.12.3 requests==2.31.0 schedule==1.2.0 sgmllib3k==1.0.0 urllib3==2.0.3 ``` And here is the error I am getting when running pytest: ``` venv ❯ pytest my_module.py E ModuleNotFoundError: No module named 'schedule' ``` I would appreciate any help in resolving this issue and being able to use the pytest version from the package manager while in the virtual environment. Thank you in advance.