Package don't run :| Error: from try.__main__ import main error syntax
erichideki opened this issue · comments
I create a virtualenv in Python 3 and install trypackage, but when I try run the application, raise an error saying:
(try)☁ try pip freeze click==6.4 trypackage==0.1.4
(try)☁ try try requests File "/home/erichideki/projects/try/bin/try", line 7 from try.__main__ import main ^ SyntaxError: invalid syntax
This problem is inside the try archive on /bin paste.
Any thoughts?
Which version of python 3 are you using?
Python 3.4 and 3.5 work fine and the bin/try
file looks different for these versions.
I'm using the Python 3.4.3 version.
I tried with Python 2.7.6 and the same error message appears.
Maybe is something in my configs that allows this borring error.
I record a simple video to show the problem with it. Maybe can help to figure out what's going on 😄
What is mkvirtualenv3
? Is this a wrapper around python-virtualenv
?
If yes, can you create your virtualenv like this: virtualenv myenv -p python3.4
?
mkvirtualenv3
It's just an alias to create virtualenvs for Python 3. If I do just mkvirtualenv
by default creates envs for Python2.
alias mkvirtualenv3='mkvirtualenv --python=/usr/bin/python3'
I tried what you said and the problem still goes on:
☁ ~ virtualenv myenv -p python3.4 Running virtualenv with interpreter /usr/bin/python3.4 Using base prefix '/usr' New python executable in myenv/bin/python3.4 Also creating executable in myenv/bin/python Installing setuptools, pip, wheel...done.
☁ ~ cd myenv
☁ myenv source bin/activate
(myenv)☁ myenv pip install trypackage Collecting trypackage Collecting click (from trypackage) Using cached click-6.4-py2.py3-none-any.whl Installing collected packages: click, trypackage Successfully installed click-6.4 trypackage-0.1.4
(myenv)☁ myenv pip freeze click==6.4 trypackage==0.1.4 wheel==0.24.0
(myenv)☁ myenv try requests File "/home/erichideki/myenv/bin/try", line 7 from try.__main__ import main ^ SyntaxError: invalid syntax
What's the output of virtualenv --version
?
My virtualenv was old, about 13.x. I was update but the problem still goes on with my virtualenv in 15.0.1 😞
I created an isolated bash (environment) Python for test, and I use the bash console from Pythonanywhere and there the problem still goes on.
I sent an email for you to show de process. Maybe is something stupid that I'm doing 😕
Thanks for the attention 😄
Well, I know where the issue is - So I'm just gonna fix it.
I just release version 0.1.5
. Can you check if it is solved and if there are any other issues for you?
@timofurrer Yeap, now it's running! 😄 🎊 😃 🎊
Thanks for the attention and patience 👍