2

I want to run this code in Github : https://github.com/llazzaro/lsa_python but I don't know how to execute it with nosetests. I have python 2.7.11 and anaconda 4.0.0, I have to run it with Spyder because I need scientific packages so when I put this link: https://github.com/llazzaro/lsa_python on Spyder I get this:

[C:\Anaconda2\python.exe: can't open file 'C:\Users\CLIENT\Desktop\lsa_python-master\sanstitre0.py': [Errno 2] No such file or directory]

arne.z
  • 3,242
  • 3
  • 24
  • 46
YayaYaya
  • 125
  • 2
  • 3
  • 10
  • Maybe this helps: [How to get an absolute file path in Python](https://stackoverflow.com/questions/51520/how-to-get-an-absolute-file-path-in-python) – arne.z Apr 25 '16 at 15:58

2 Answers2

3

Maybe you need to set your working directory correctly. It probably looks for the path from the current working directory.

You can change it here: enter image description here

arne.z
  • 3,242
  • 3
  • 24
  • 46
  • i do it, and i have the same problem. Please i need more help – YayaYaya Apr 25 '16 at 14:55
  • I don't know what else could be the problem. You made sure that the file `sanstitre0.py` really exists in that directory, right? But, btw, you don't need to use Spyder just because you need scientific packages. You can also install those packages by yourself. For example with with [`pip`](https://pip.pypa.io/en/stable/quickstart/) and then use any other editor you like. – arne.z Apr 25 '16 at 15:56
  • Yes, i know but it doesn't work for me when i went to install scipy with pip on Windows 7, 64 bits. it's simple in 32 bits so i can't. in that case i choose to install anaconda2 for this packages. now i want to execute this link https://github.com/llazzaro/lsa_python in Spyder – YayaYaya Apr 25 '16 at 16:53
2

Little late to answer these questions But still if anyone facing the same issue this answer might help

I was facing the same issue. I even reinstall the anaconda. But it's still doing the same issue. Then I figure out something very silly.

First of all, you have to set your working directory

After that, you have to hit the Run button. I was pressing ctrl + enter But after setting the working directory for the first time you have to hit the run button then it will work

Hope it will help.

enter image description here

sayalok
  • 882
  • 3
  • 15
  • 30