Ziptastic/ziptastic-python

Something is broken with Python 3.6

karamanolev opened this issue · 9 comments

I haven't confirmed it's only Python 3.6, but on a system with Python 3.6 working normally, in a virtualenv, when I do pip install ziptastic-python it installs OK, but then:

Python 3.6.4+ (default, Feb 12 2018, 08:25:03) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ziptastic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ziptastic'
>>> from ziptastic import Ziptastic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ziptastic'
>>> 

Thank you for reporting @karamanolev!

I think it was due to a bad reference to an old file in the setup.py.

I've since updated the release and it appears to be working for me.

Could you try again and let me know if you run into the issue?

pip install -U ziptastic-python should update the package.

@daspecster I think there is now 1.0.0b2 on pypi, but I get the same error. Here, I created a brand new virtualenv and installed the latest ziptastic-python from pypi. By the way, I'm on Ubuntu 18.04 if it makes any difference:

ivailo@ivailo-precision:~$ virtualenv -p python3 ziptest
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/ivailo/ziptest/bin/python3
Also creating executable in /home/ivailo/ziptest/bin/python
Installing setuptools, pip, wheel...done.
ivailo@ivailo-precision:~$ source ziptest/bin/activate
(ziptest) ivailo@ivailo-precision:~$ pip install -U ziptastic-python
Collecting ziptastic-python
  Using cached ziptastic_python-1.0.0b2-py2.py3-none-any.whl
Collecting requests (from ziptastic-python)
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->ziptastic-python)
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->ziptastic-python)
  Using cached certifi-2018.1.18-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->ziptastic-python)
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->ziptastic-python)
  Using cached urllib3-1.22-py2.py3-none-any.whl
Installing collected packages: chardet, certifi, idna, urllib3, requests, ziptastic-python
Successfully installed certifi-2018.1.18 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22 ziptastic-python-1.0.0b2
(ziptest) ivailo@ivailo-precision:~$ python
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ziptastic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ziptastic'
>>> from ziptastic import Ziptastic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ziptastic'
>>> 

Can you run a couple commands for me?

which python
which python3

@daspecster Same virtualenv as above:

(ziptest) ivailo@ivailo-precision:~$ which python
/home/ivailo/ziptest/bin/python
(ziptest) ivailo@ivailo-precision:~$ which python3
/home/ivailo/ziptest/bin/python3
(ziptest) ivailo@ivailo-precision:~$ python --version
Python 3.6.5rc1
(ziptest) ivailo@ivailo-precision:~$ python3 --version
Python 3.6.5rc1

Hmmm...

So I have python 3.6.4 installed and it's working as expected. I'm not sure what would have changed in 3.6.5rc1 to cause this.

I'll install 3.6.5rc1 and see what I can find ou.

ebk46 commented

I'm having the exact same problem with ziptastic-python 1.0.0b2 - tested with Python 3.6.6 and 2.7.13 on Mac OS 10.13.6. It seems like pip isn't actually installing the ziptastic.py module.

$ find /Users/uname/.virtualenvs/ziptastic-test -name "ziptastic*"
/Users/uname/.virtualenvs/ziptastic-test
/Users/uname/.virtualenvs/ziptastic-test/lib/python3.6/site-packages/ziptastic_python-1.0.0b2.dist-info

Interesting...why does it work for me? lol

@ebk46 are your steps to reproduce the same as the previous ones?

ebk46 commented

Yep! Here is a full output:

computer:~ uname$ mkvirtualenv ziptastic-test
Using base prefix '/Users/uname/anaconda3'
New python executable in /Users/uname/.virtualenvs/ziptastic-test/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/uname/.virtualenvs/ziptastic-test/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/uname/.virtualenvs/ziptastic-test/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/uname/.virtualenvs/ziptastic-test/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/uname/.virtualenvs/ziptastic-test/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/uname/.virtualenvs/ziptastic-test/bin/get_env_details
(ziptastic-test) computer:~ uname$ which python
/Users/uname/.virtualenvs/ziptastic-test/bin/python
(ziptastic-test) computer:~ uname$ which python3
/Users/uname/.virtualenvs/ziptastic-test/bin/python3
(ziptastic-test) computer:~ uname$ python --version
Python 3.6.6 :: Anaconda, Inc.
(ziptastic-test) computer:~ uname$ python3 --version
Python 3.6.6 :: Anaconda, Inc.
(ziptastic-test) computer:~ uname$ pip install ziptastic-python
Collecting ziptastic-python
  Using cached https://files.pythonhosted.org/packages/8a/a3/f12f875350fb60a9be80344d2ad8949c8e89004c89f1e248dc47df49fb1a/ziptastic_python-1.0.0b2-py2.py3-none-any.whl
Collecting requests (from ziptastic-python)
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->ziptastic-python)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->ziptastic-python)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests->ziptastic-python)
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests->ziptastic-python)
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Installing collected packages: chardet, certifi, idna, urllib3, requests, ziptastic-python
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7 requests-2.19.1 urllib3-1.23 ziptastic-python-1.0.0b2
(ziptastic-test) computer:~ uname$ python
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:07:29)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ziptastic import Ziptastic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ziptastic'
>>>

@ebk46 I'm not able to reproduce the issue.

Does it work if you try and access python with /Users/uname/.virtualenvs/ziptastic-test/bin/python?

I also saw some issues with Anaconda and the site-packages path.

You may have to install it with conda install ziptastic-python