Forums

No module found error (Sympy)

When I run my code with Sympy it works fine but when I now go live I get the error sympy package is not found. I have checked and found the package is installed and whenever I try to uninstall it so that I can install it back and see if tit works, I get the error message: OSError: [Errno 13] Permission denied: '/usr/bin/isympy' Other packages like numpy are not showing any errors what can I do to resolve this issue with sympy

You will be not able to remove system wide pre-installed packages. Make sure that the code you run that is showing the error uses the same Python environment that you used for testing. Otherwise (for example if you use a virtual environment) you may need to install the required package for this environment separately.

The picture shows My code works with fine with sympy but when I go live I get an error pointing to the same location where the code is working fine. I don't understand

I see that your website is set up to use a virtualenv. Have you specifically installed sympy into that virtualenv? When you run code from the editor, it won't be using it -- it will just use the default system environment, which has a lot of packages installed. To install it into the virtualenv, start a Bash console in the env using the link on the "Web" page, and run "pip install sympy".

I have tried severally and it says that sympy is already installed

I have used the link on my web page but nothing

Could you go to your the Web page, click on the link below the virtualenv path ("Start a console in this virtualenv") and run pip show sympy? If it's not installed, then -- still being in that very console -- run pip install sympy and check if that installs correctly.

@giles I have done as you say but nothing. Are you guys able to view the images I have attached. Correct me if I'm wrong but have I not used the link to my webpage

shows sympy is already installed

I'm using the link to my webpage

I can't view your images