1

i'm trying to add new libraries to python_path, but I failed.

This is the new libraries path new libraries path

and here my already added and recognized by external IDEs like pycharm libraries

Path view

so those new libraries I can work on, but only inside their apps. I want to use them into PyCharm.

What should I do?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
Mohamed Sayed
  • 844
  • 5
  • 15
  • There's a difference between the system path, which controls where the OS looks for executables when you run them without a fully qualified path (e.g. when you run just "python", it'll look through the path for it. There's the Python path that's separate from that -- type `python -v` to see it being queried, or view `sys.path`. – Scovetta Feb 17 '17 at 05:19
  • okay, then what should i do to use modules inside that directory into PyCharm – Mohamed Sayed Feb 17 '17 at 05:25
  • See http://stackoverflow.com/questions/17198319/how-to-configure-custom-pythonpath-with-vm-and-pycharm – Scovetta Feb 17 '17 at 05:52
  • use sys.path.append("path to library") in your main – Arun Feb 17 '17 at 06:41
  • i'm sorry, it didn't work after excuting append() , still nothing when i try to import them Pycharm refuse to reconize modules – Mohamed Sayed Feb 17 '17 at 07:00

1 Answers1

1

I think your problem could come from the space in the "Program Files" folder so you can try using the short names path.

Open a dos command on the folder you want to use ([SHIFT]+ right mouse click => Command prompt here)

Type this command to get the dos form path (source)

for %I in (.) do echo %~sI

Then use this path form as advised in the comments

Community
  • 1
  • 1
Maxwell77
  • 918
  • 6
  • 16