0

I tried to run a script with python, it has taichi package downloaded from GitHub.

I have little knowledge of how python packages are installed, now I got error in command prompt like "ModuleNotFoundError: No module named 'taichi'"

I just installed package downloaded from GitHub: https://pypi.org/project/taichi/#files

Hope someone can teach what should I do to run my script contains taichi package~

4 Answers 4

0

To install packages in python you just run the command pip install (name of package) in the command prompt so in your case that would be pip install taichi

Sign up to request clarification or add additional context in comments.

Not OP but this does not seem to work for this specific module. Try it out and see if yours install mine says the module does not exist.
The link you provided says to run that command
Again, not the OP. But yeah I tested that as well and it did not work. Wondering if maybe the module is having issues.
Yes it works , you can try pip3 install taichi or python -m pip install taichi
I cannot put a screenshot but definetly not working and I copied it from the website and what you put.
0

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 

Now create a virtual environment

virtualenv venv 

Active your virtual environment:

source venv/bin/activate

Now install your package for python

 pip3 install taichi

Thanks! I have followed your procedures successfully until creating virtual environment, a few python interface popped up, then disappeared, then I continue to activate in command line. Error appeared: 'source' is not recognized as an internal or external command, operable program or batch file. Can you tell what I missed to do?
go to folder venv and run . bin/activate
I went to folder venv, but it told me: '.bin' is not recognized as an internal or external command, operable program or batch file. And I type "dir", there is no .bin file indeed, there were .gitignore, Lib, pyvenv.cfg, Scripts
0

I have figured it our that this Taichi package needs 64 bits python, it also needs LLMV file downloaded. Besides, there should be virtual studio installed in the local computer. Then this Taichi package can be installed just by using "pip install taichi" in command.

Thanks for everyone's help!

Comments

0

I alse encountered this problem,I confirmed that I have already successfully installed taichi whereas it still showed "no module named taichi" .And here is my solution:tryimport sysandsys.path to check whether the file of the packages is contained in python's search range.

For example,after I inputsys.path in python ,it shows ['e:\\', 'd:\\anaconda2022\\python39.zip', 'd:\\anaconda2022\\DLLs', 'd:\\anaconda2022\\lib', 'd:\\anaconda2022', '', 'd:\\anaconda2022\\lib\\site-packages', 'd:\\anaconda2022\\lib\\site-packages\\win32', 'd:\\anaconda2022\\lib\\site-packages\\win32\\lib', 'd:\\anaconda2022\\lib\\site-packages\\Pythonwin']

I am using anaconda as the python interpreter in vscode ,so the packages of taichi is installed in d:\\anaconda2022\\lib\\site-packages,and I can import it successfully . But previously my sys.path are incorrectly setted to E:\\Python but not D:\\anaconda2022. Python cannot find the packages of taichi from the wrong sys.path.

Check the sys.path in python may help.If it is the one which cause the problem , there are many ways to edit sys.path .I solved it by uninstalling the python for I installed python and anaconda at the same time (- -).

Comments

Your Answer

Draft saved
Draft discarded

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.