0

Here are the steps I took:

  1. Create virtual environment called 'env' with :

    py -m venv env

  2. Activate virtual env

.\env\Scripts\activate

  1. Install dependencies with a .cfg and .toml with:

    pip install .

  2. Try to run python script:

    (env) C:\Users\Steven\Desktop\AIMDyn\klogistics>python src\klogistics_examples\mtf\mtfproject.py Traceback (most recent call last): File "C:\Users\Steven\Desktop\AIMDyn\klogistics\src\klogistics_examples\mtf\mtfproject.py", line 7, in from klogistics.project.project import Project File "C:\Users\Steven\desktop\AIMDyn\klogistics\env\lib\site-packages\klogistics\project\project.py", line 7, in from klogistics.algorithm.Koopman4COVID19 import Koopman4COVID19 #type: ignore ModuleNotFoundError: No module named 'klogistics.algorithm'

  3. Check is klogistics is installed:

     (env) C:\Users\Steven\Desktop\AIMDyn\klogistics>pip list
    

    Package Version


    klogistics 0.0.1 numpy 1.22.3 pandas 1.4.2 pip 22.0.4 python-dateutil 2.8.2 pytz 2022.1 scipy 1.8.0 setuptools 58.1.0 six 1.16.0

Here is some information that might help:

        (env) C:\Users\Steven\Desktop\AIMDyn\klogistics>pip -V
    pip 22.0.4 from C:\Users\Steven\desktop\AIMDyn\klogistics\env\lib\site-packages\pip (python 3.10)
    
    (env) C:\Users\Steven\Desktop\AIMDyn\klogistics>python -V
    Python 3.10.4
    
(env) C:\Users\Steven\Desktop\AIMDyn\klogistics>where pip
    C:\Users\Steven\Desktop\AIMDyn\klogistics\env\Scripts\pip.exe
    C:\Users\Steven\AppData\Local\Microsoft\WindowsApps\pip.exe
    
(env) C:\Users\Steven\Desktop\AIMDyn\klogistics>where python
    C:\Users\Steven\Desktop\AIMDyn\klogistics\env\Scripts\python.exe

C:\Users\Steven\AppData\Local\Programs\Python\Python310\python.exe
  • I am not entirely sure how to help with this problem, but you might want to check answers from this post: https://stackoverflow.com/questions/32004958/python-module-not-found-in-virtualenv – medium-dimensional May 03 '22 at 22:53

1 Answers1

0

Solved:

I installed the packages in the wrong directory. I installed it in the same level as my env, and packages, when it needed to be one level above.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 05 '22 at 16:25