Code Monkey home page Code Monkey logo

Comments (6)

mblondel avatar mblondel commented on July 21, 2024

Hi!

  1. What is the difference ?

Pip installs the project directly in your Python distribution. The second makes a local copy and installs it to your Python distribution.

  1. I plan to fork this repo and contribute to it, in that case, should I install from source ?

Yes. It's better to edit the local copy than the files in your Python distribution.

  1. How do I view the effects of the changes I make to my local code clone ?

One solution is to run sudo python setup.py install every time but this is not very convenient.

Personally, I have added lightning to the PYTHONPATH environment variable in my .bashrc file:

export PYTHONPATH=/path/to/lightning:$PYTHONPATH

where /path/to/lightning is the project root folder (the one containing the README.rst file). This way, Python will look in this folder when doing import lightning.

lightning contains a few C files that must be compiled directly in the project. This can be done with

make inplace

at the project root. Let me know if something was unclear.

from lightning.

darshanime avatar darshanime commented on July 21, 2024

Neat!

I was also wondering about virtual envs (Anaconda). Can they be used ?

Also, if instead of changing my PYTHONPATH environment variable, if I cd into the root folder before importing lightning, won't it have the same effect ?

from lightning.

mblondel avatar mblondel commented on July 21, 2024

I was also wondering about virtual envs (Anaconda). Can they be used ?

Not sure what you mean.

Also, if instead of changing my PYTHONPATH environment variable, if I cd into the root folder before importing lightning, won't it have the same effect ?

This will only work if you put your .py files at the project root, which I don't recommend.

from lightning.

darshanime avatar darshanime commented on July 21, 2024

So, basically I should install via source, point my PYTHONPATH to the project dir and compile each time I make a change.

from lightning.

mblondel avatar mblondel commented on July 21, 2024

Exactly.

from lightning.

darshanime avatar darshanime commented on July 21, 2024

Thank you, I am sorted.

from lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.