I am trying to create a portable venv on my stick to copy paste it to someone, so he doens't need to install python on the pc to run my python script. I tried searching here for a solution, but maybe because I am new to python and environments I can't find the right answer.
I installed Python version 3.9.1 from the website in my folder (Python) and created an environment with it:
Pythonpyverpy391python -m venv pyenv
running where
in venv shows:
(pyenv) D:CD_InhaltUpperLimb>where python
D:CD_InhaltUpperLimbPythonpyenvScriptspython.exe
running my script show an error:
(pyenv) D:CD_InhaltUpperLimb>UpperLimb.py
Traceback (most recent call last):
File "D:CD_InhaltUpperLimbUpperLimb.py", line 11, in <module>
import c3d
ModuleNotFoundError: No module named 'c3d'
But I know that I installed c3d:
(pyenv) D:CD_InhaltUpperLimb>pip list
Package Version
--------------- ---------
appdirs 1.4.4
c3d 0.3.0
certifi 2020.12.5
chardet 4.0.0
...
This Computer doens't have Python installed. Running print(sys.path) shows following:
(pyenv) D:CD_InhaltUpperLimb>python
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', 'D:\CD_Inhalt\UpperLimb\Python\pyver\py391\python39.zip', 'D:\CD_Inhalt\UpperLimb
\Python\pyver\py391\DLLs', 'D:\CD_Inhalt\UpperLimb\Python\pyver\py391\lib',
'D:\CD_Inhalt\UpperLimb\Python\pyver\py391', 'D:\CD_Inhalt\UpperLimb\Python\pyenv',
'D:\CD_Inhalt\UpperLimb\Python\pyenv\lib\site-packages']
So where excatly did I made an error? I am confused. Appreciate any help :) Greetings
Edit 1: like hoefling mentioned it. If I write python UpperLimb.py
it works. How can I run it directily as an executable? Without python
before?