How to add to the python path in Windows

0 votes

I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my pythonpath so I can call the apps directly.

I have tried adding C:\My_Projects\; to my Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error:

Error: No module named coltrane

Jul 25, 2018 in Python by Neha
• 6,300 points
794 views

1 answer to this question.

0 votes

You know what has worked for me really well on windows.

My Computer > Properties > Advanced System Settings > Environment Variables >

Just add the path as C:\Python27 (or wherever you installed python)

OR

Then under system variables I create a new Variable called PythonPath. In this variable I have C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\other-folders-on-the-path

answered Jul 25, 2018 by Frankie
• 9,830 points

Related Questions In Python

0 votes
1 answer

What is the procedure to find the exact path of python installation in Windows?

This is a very simple thing to ...READ MORE

answered Aug 26, 2019 in Python by Neel
• 3,020 points
461 views
0 votes
1 answer

How to add a new line in Python?

You can use '\n' for a next ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
994 views
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by aryya
• 7,450 points
1,053 views
0 votes
3 answers

How to get the current time in Python

FOLLOWING WAY TO FIND CURRENT TIME IN ...READ MORE

answered Apr 8, 2019 in Python by rajesh
• 1,270 points
1,667 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,007 views
0 votes
1 answer
0 votes
1 answer

How to get the current time in Python

>>> import datetime >>> datetime.datetime.now() datetime(2018, 25, ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,830 points
512 views
0 votes
1 answer

Python - convert string to list

states.split() will return ['Alaska', 'Alabama', 'Arkansas', 'American', 'Samoa', ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,830 points
439 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP