I am trying to import sympy and I get no module error. This is because I recently installed python 3.9 and when i search where sympy is stored it says python 3.8.6 how can I move the libraries to 3.9? Or can I downgrade idle? I am using ubuntu. Thanks!
Install pip
for python3.9. You can do that using following commands
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3.9 get-pip.py
python3.9 get-pip.py --user
Then you can use pip
for installing sympy
In case if you want to take with the virtual environment path you can refer the above solution given by Anti_cse51, but you need to use python3.9 -m venv my-project-env
for creating the virtualenv instead python3
Create a virtual environemnt
python3 -m venv my-project-env
Activate the envirnoment
source my-project-env/bin/activate
then install sympy
pip install sympy
This was there would be no conflict with local packages
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.