Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 install problem: ImportError: No module named 'org' #2

Closed
niki-sp opened this issue Feb 11, 2016 · 4 comments
Closed

pip3 install problem: ImportError: No module named 'org' #2

niki-sp opened this issue Feb 11, 2016 · 4 comments

Comments

@niki-sp
Copy link

niki-sp commented Feb 11, 2016

after "pip3 install transcrypt" on ubuntu 15.10 i get

ImportError: No module named 'org'

while trying >>> import Transcrypt.transcript

@JdeH
Copy link
Collaborator

JdeH commented Feb 11, 2016

Hi,
You don't have to import Transcrypt, it's a compiler, not a library.
After installing it (no pip currently, just copy and extract after downloading from PyPi, see docs), you use it like this:

transcrypt .py

You then get several JS files and a parse tree in the javascript directory.
Don't let this confuse you, you only need .js or <\myFileName.min.js> to put your project to the web.
If you want to make a Transcrypt library rather than an application, you can either distribute .py, or the compiled module file .mod.js.

The .mod.js file is the code for your main module.
The .js and .min.js include the Transcrypt runtime and any encapsulated JS libs, in prettyprinted and minified form respectively.
Note that you don't have to encapsulate or even include the JS libs, you can load them on the fly from a CDN as usual.
But the Transcrypt runtime is always included, since joined minification gives smaller files due to identifier shortening. Other Transcrypt modules are included automatically but only if they are actually used.

Maybe it's best to start out by compiling and running the hello.py demo, and then make small alterations and building it out from there.

Also take a look at the HTML files in the examples to see how Transcrypt is used there.

@niki-sp
Copy link
Author

niki-sp commented Feb 11, 2016

Ok i can clone and install it. My suggestion is to support pip3 install for easier adoption.

@JdeH
Copy link
Collaborator

JdeH commented Feb 11, 2016

I will. Just focused on the Alpha rightnow. But it's agreed that installation should as easy as possible.

@Shaafihiy
Copy link

i try importing the following
import org.opensim.utils as utils
i got an error saying 'No module named org'
someone assist me on this please

JennaSys pushed a commit that referenced this issue Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants