matplotlib / cmocean

Colormap setup for standardizing commonly-plotting oceanographic variables.
MIT License
230 stars 52 forks source link

Python 3.4.3 - pip install cmocean fails #44

Closed Mascagni-ML closed 8 years ago

Mascagni-ML commented 8 years ago

Hi, my name is Mario Luiz Mascagni. I'm new on GitHub and Python environments. I've been trying to install cmocean, using pip 8.0.2, but without success. I create a python virtual environment and I installed numpy and matplotlib; and then, I create the requirements.txt file for both using the "pip freeze" command; but when I try to install cmocean, it gives the following error: File "/tmp/pip-build-hfgikas4/cmocean/setup.py", line 30, in with open('requirements.txt') as f: FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

I have no idea why the script setup.py isn't finding the "requirements.txt" file. I checked the cmocean-0.2.1.tar.gz file and it seems to be there. Can someone help me please?

Mascagni-ML commented 8 years ago

I found the problem. In line 30 of the file setup.py it is called: "requirements.txt"; but in cmocean-0.2.1.tar.gz the file is named: "requires.txt"

tacaswell commented 8 years ago

@Mascagni-ML Thanks for the bug report! Would you be interested in opening a pull request to fix this?

https://guides.github.com/introduction/flow/ and http://matplotlib.org/devel/gitwash/git_development.html

are good resources to get started (the later applies to matplotlib, but I am assuming that @kthyng is using similar processes/workflows)

ocehugo commented 8 years ago

@Mascagni-ML @tacaswell #46

dkauf42 commented 8 years ago

Thanks for working out this fix! It seems like this issue prevents any use of the cmocean package until it is resolved.. is that correct? I would like to use cmocean in the pycharm IDE, but it won't install because of this issue (pycharm installs cmocean by executing the command "pip install --user cmocean"). Am I right in assuming that nothing can be done with cmocean until this fix is incorporated into the online (I'm not sure what to call it) version?

kthyng commented 8 years ago

I'm sorry I haven't been able to spend devote any time to cmocean for a month or two — I'm really hoping to in the next couple of weeks. But in the meantime, I'm not familiar with pycharm, but you could try just cloning cmocean and then install locally with 'pip install .' while in the cmocean directory.

ocehugo commented 8 years ago

@dkauf42 in the meantime you could just add this to pycharm pip command:

pip install git+mybranch

where mybranch is my cmocean branch address in github.

dkauf42 commented 8 years ago

Thank you both @kthyng and @ocehugo! I managed to get it working by cloning cmocean into the pycharm packages directory and then installing locally using the pip version that matches my pycharm interpreter, so:

pip3.4 install .

alpha-beta-soup commented 8 years ago

Just to clarify @ocehugo, that's

pip install https://github.com/ocehugo/cmocean/archive/master.zip

Or if you want it inside a pip requirements.txt, the following should work:

git+git://github.com/ocehugo/cmocean.git#egg=cmocean

Thanks for the neat colours.

kthyng commented 8 years ago

After incorporating some PRs I just tried to update the package on PyPI but had this issue when testing it: Server response (400): Invalid version, cannot use PEP 440 local versions on PyPI.

Anyone know about this? I updated the version to 0.2.2 but I think it also now gets information from versioneer.

kthyng commented 8 years ago

Also getting confused about the travis ci builds that are failing — maybe someone can help me out a bit here. Maybe @tacaswell or @ocefpaf or others?

ocefpaf commented 8 years ago

Anyone know about this? I updated the version to 0.2.2 but I think it also now gets information from versioneer.

I usually avoid versioneer for small projects. It adds a lot of boilerplate code.

Also getting confused about the travis ci builds that are failing

https://travis-ci.org/matplotlib/cmocean/builds/116256635 says

Could not find .travis.yml, using standard configuration.

and somehow that commit does not have that file. See https://github.com/matplotlib/cmocean/tree/7236f5eb58a0a715e8a25bb188252a57035489a3

Travis was introduced in #41 . Maybe you need to rebase against master.

ocehugo commented 8 years ago

Maybe you need to update some files ? I saw that before @ocefpaf push a commit with a manifest but versioneer handles the manifest file (as far as I can remember WRONG - distutils does that). So maybe it's just a matter of updating the manifest.in or alike, but i'm not a pypi guru.

ocehugo commented 8 years ago

@kthyng also take a look on previous commits. I just found that the repo is about ~150mb. Looks like in the previous commits there were some png and pdf files, which make cloning a bit slow.

kthyng commented 8 years ago

Update: Travis is currently compiling ok.

Next: I will try PyPI again.

Further next: I will try to reduce the size of the repo. I've realized this for awhile but hadn't acted on it. I can go through and remove the history of some larger files from the past, but I need to figure out how best to do it.

kthyng commented 8 years ago

I feel like I am surely jinxing myself, but I think it is working!

Try "pip install cmocean" and let me know if it works!

kthyng commented 8 years ago

Ok I think everything is ok now (just checked again), so I am going to close this.