1

I have downloaded a package and need to "add it to PYTHONPATH" as indicated in the documentation. How may I do it?

I am using Visual Studio for python, if that matters.

0

1 Answer 1

3

In python you can do:

import sys
sys.path.append("yourpath to package")

From within python. Or you can set your environment variables in Windows after right clicking on 'computer' and selecting properties.

Also it's easy in python to install packaged with 'pip'.

Sign up to request clarification or add additional context in comments.

5 Comments

I have done the sys.append, but ImportError: No module named Kernel
Does the appended folder have a kernel.py or init.py file?
it has a init but no kernel
That is an __ init __.py without the whitespace.
Add the path to the folder where the __init__.py file is in rather than to the __init__.py file itself. I.e. sys.append.path('C:\apath) which is the folder which contains the kernel folder with the __init__.py file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.